Visual Studio UI Testing - c#

I have done some extravagant web searching for a solution to no avail.
I am working with a UI tester written by a man who is no longer with the company.
Currently it is hanging up on opening the browser for testing the website.
I have no idea what I'm doing.
BrowserWindow.CurrentBrowser = "ie";
"An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.VisualStudio.TestTools.UITesting.dll
Additional information: Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.WindowsStoreUtility, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."

Figured out what the issue is. I can't run it directly. I have to pass it to MSTest.exe with arguments.
If you don't know where MSTest.exe is, here is where mine is, and most likely yours.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe

Related

Can't run a C# web API in Visual Studio 2022

I am trying to run a web API written in C#,in Visual Studio code 2022 but I keep getting this error
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I was having the exact same error, it turned out Visual Studio just needed an update.
Updated it and restarted the app and it went away.

Missing Browserlink in VS2019, Where is browserlink acquired / loaded from normally?

My local install of VS2019 (16) seems to be missing references to BrowserLink. I've tried repairing the installation, and installing multiple different SDK's to no avail.
Where is BrowserLink normally located? And what is the mechanism that causes it to be loaded in development versions? It doesn't seem to be packaged seperately from VS since version 12, unless you are using the new .net core versions.
We have checked the GAC, NuGET, and are running out of options.
It's a .net 4.5 project, if that's relevent.
Could not locate assembly Microsoft.WebTools.BrowserLink.Runtime, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a in the Assembly Stores configured. Requesting assembly:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Could not locate assembly Microsoft.WebTools.BrowserLink.Runtime, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a in the Assembly Stores configured. Requesting assembly:
The root cause is almost certainly something to do with the dumb way this project has a shared non-standard assembly cache, and doesn't fallback to normal dev locations, but the question is about what the normal location/mechanism is for BrowserLink (16) to be loaded.
If you have installed your VS2019 in default options, you can find the Browser Link library files in this path:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\Microsoft\Web Tools\Browser Link
(Replace the path of your installation location as appropriate)
You can then decide whether to copy Microsoft.WebTools.BrowserLink.*.dll to the assembly cache of your application or include this path in your application.

NanoFramework Device Explorer would not open

I was able to use nanoframework normally but somehow the DeviceExplorer no longer opens now.
I checked the ActivityLog.xml and it shows the following error:
819 ERROR SetSite failed for package [Visual Studio 2019 extension for nanoFramework. Enables creating C# Solutions to be deployed to a target board and provides debugging tools.]Source: 'nanoFramework.Tools.VS2019.Extension' Description: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Threading, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualStudio.Threading, Version=16.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'at nanoFramework.Tools.VisualStudio.Extension.NanoFrameworkPackage.<InitializeAsync>d__65.MoveNext()at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)at nanoFramework.Tools.VisualStudio.Extension.NanoFrameworkPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress)at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass20_0.<<Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)at Microsoft.VisualStudio.Services.VsTask.GetResult() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. {046B40EB-1DE1-4D08-AF61-FDB7592B9BBD} 80070002 VisualStudio 2021/03/21 07:18:45.265
820 ERROR End package load [Visual Studio 2019 extension for nanoFramework. Enables creating C# Solutions to be deployed to a target board and provides debugging tools.] {046B40EB-1DE1-4D08-AF61-FDB7592B9BBD} 80070002 VisualStudio 2021/03/21 07:18:45.270
I want to highlight that my Visual Studio nanoframework extension is set to update automatically and it sounds like it recently got updated to 2019.5.0.34
I am using Visual Studio Profession 2019 16.8.3
Disabling/Enabling the extension, restarting the visual studio did not help.
Any clue what could be causing this issue?
You should update Visual Studio to 16.9 or higher.

Visual Studio Error - FSharp.Core, Version=4.3.1.0

I have encountered a very iritating problem using Visual Studio 2017 Community. When downloading any package from NPM (here for example System.Web.Http.Common) every time I get this error:
System.IO.FileNotFoundException: Could not load file 'FSharp.Core, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
My project does not have any Fsharp files, it is pure ASP.NET project.
Update of VS did not help.
What am I supposed to do?

Could not load file or assembly in Visual Studio 2010

My project uses another lib project as reference.
I get this error when trying to run a project in "Relase" Mode, In "Debug" Mode it works fine.
It says that it cannot load the lib project because :
"An unhandled exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'UserManagementProviders,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
An attempt was made to load a program with an incorrect format."
BadImageFormatException means 32/64 bit mismatch. Check your project configurations. The x86/x64/Any CPU settings must be messed up among Debug and Release configurations.
I think this is related to the difference in 64bit and 32bit DLL builds and processes.
Try compiling to 32bit by changing project properties/Build/Platform Target.

Categories

Resources