FileNotFound Exception when referencing LinqPad.exe - c#

I am trying to use LinqPad's dump feature (https://stackoverflow.com/a/9437947/3375305) from within Visual Studio. (.netCore 1.1 Console App).
I have added a reference to LinqPad.exe, but whenever I try and run the program, a File Not Found exception is thrown.
System.IO.FileNotFoundException: 'Could not load file or assembly
'LINQPad, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=21353812cd2a2db5'. The system cannot find the file
specified.'
I have tried LinqPad 5.10, 5.10 AnyCPU, 5.21 AnyCPU (Beta)

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.

Could not load file or assembly Microsoft.AspNetCore.Http.Abstractions

I installed a XYZ package in my project of type class library. That new package depends on the file Microsoft.AspNetCore.Http.Abstractions.
When I do the deployment in OpenShift I have the following error:
"Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly >'Microsoft.AspNetCore.Http.Abstractions, version=3.1.0.0, Culture=neutral, >PublicKeyToken=xyzxyzxyz'. The system cannot find the file specified."
Has anyone seen this problem?
Thanks!

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.

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Runtime.WindowsRuntime

I am running a UWP app for windows iot core. I dropped in some code from a .net framework. I have converted most of the errors that occurred (most was compatible with the new update build 16299). I am now getting the error
System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.'
I keep seeing in some of the nuget packages i have installed:
Microsoft.NETCore.UniversalWindowsPlatform v6.0.6 that
System.Runtime.WindowsRuntime (>= 4.0.11) is covered.
I am not sure why it is looking for v 4.0.0.0.
Saw this thread but its slightly different: UWP application: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.14.0
Does anyone have any ideas?

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