-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Omnisharp can not find assembly netstandard #3004
Comments
The rollback to 1.18.0 worked for me, but be sure to set the preference "extensions.autoUpdate" to false or it will just reinstall 1.19.0 |
do you have .NET 4.7.2 installed? It appears to be the reason for this failure. |
I do have auto update turned off, so Omnisharp is at version 1.18.0 |
It appears I have 4.7.2 installed... C:\Windows\Microsoft.NET\Framework\v4.0.30319>.\msbuild.exe -version 4.7.2046.0 |
I can't install 4.7.2 (Windows 8.1). Installation fails. So I think I may be stuck on 1.18.0. Microsoft seem to have forgotten developers are still using older OS versions. |
Probably because of this: |
yes, you must have had If you want to pin the version please use |
@SirIntruder you're probably correct - I see my file was updated today at 2:48pm (50 minutes ago) when I was still on version 1.18. No clue how it got updated, but it definitely has the 4.7.2 framework requirement in the config:
Once everything started working again, I then allowed VS Code to do an update to 1.19 and I'm still good to go. Very odd sequence of events the last 2 days - I'd like to know what caused it and how to prevent it in the future. |
@filipw - I still have that in my settings:
Should it be set to something else? |
Like I mentioned, the error was caused by the lack of .NET 4.7.2 on your Windows box (note, the version that you posted was just the msbuild version, not the .NET Framework version). Unfortunately we missed the Apologies for the trouble. 😞
Have a look at my comment here, I try to explain the different possible settings OmniSharp/omnisharp-roslyn#1416 (comment) Since you now have 4.7.2 wired in, it should be safe to remove that setting completely and just use the OmniSharp that's bundled with the 1.19.0 extension. |
@filipw - Awesome explanation - thanks for your help and detailed information :) |
Same issue, resolved disabling update and installing 1.18.0 |
This was resolved by OmniSharp/omnisharp-roslyn#1469 |
I'm creating a Blazor project with .NET Core 3.0 following the official documentation: Get started with Blazor and having this issue. Why do i have to install .NET Framework 4.7.2 as a workaround if .NET Core is supposed to replace the .NET Framework? I'm not a .NET Developer but that is what i understood |
@GabrielBB OmniSharp, the component used by the C# Extension for VS Code to provide intellisense, runs on .NET Framework 4.7.2. Your Blazor project runs in .NET Core, but this particular development tool requires .NET Framework. Note that the fact that you have to manually determine that you need install 4.7.2 is a bug that we fixed in OmniSharp/omnisharp-roslyn#1469 |
I have the same issue, but on linux |
Ditto for Linux.
|
I think this is fixed if you install |
I am getting this on Mac since upgrading to .NET Core 3.0 |
Same here @koliyo . |
Just for the sake of completeness... I had the same issue on Debian 10 and Omnisharp uses the mono environment installed. After upgrading mono-devel to 6.14 using the standard installation procedure, the error was resolved. |
I ran in to this too, but what do you mean by the standard installation procedure? The standard
Nevermind, I must have done something wrong. A reinstall of Still this is strange, as I have never before had to install |
I upgraded to Linux Mint 20 and had a similar issue. Tried reinstalling just about everything dotnet related but the only thing that worked for me was apt install mono-devel |
This happened again after todays update... sighs |
Issue Description
Upon starting up VS Code, I get an immediate error in the OmniSharp output indicating the following below. I reverted Omnisharp back to version 1.18 as per this Stack Overflow article, but I'm still getting the same error:
System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
b__1()File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.
at OmniSharp.HostHelpers.Start(Func`1 action) in D:\a\1\s\src\OmniSharp.Host\HostHelpers.cs:line 29
Steps to Reproduce
After OmniSharp update to 1.19, start VS Code and error occurs. Reverted back to 1.18 and error still occurs. This was not occurring 2 weeks ago.
Expected Behavior
No error should occur; Intellisense and inline errors should be displayed
Actual Behavior
The error above is produced; no intellisence nor inline errors are displayed.
OmniSharp log
OmniSharp server started.
Path: C:\Users\moserk.vscode\extensions\ms-vscode.csharp-1.18.0.omnisharp\3.5.0-beta.2219\OmniSharp.exe
PID: 7952
System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
b__1()File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.
at OmniSharp.HostHelpers.Start(Func`1 action) in D:\a\1\s\src\OmniSharp.Host\HostHelpers.cs:line 29
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].
C# log
Getting latest OmniSharp version information
Downloading package 'Latest OmniSharp Version Information' (1 KB).................... Done!
Environment information
VSCode version: 1.33.1
C# Extension: 1.18.0
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.203 Commit: e5bab63ecaRuntime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.203\
Host (useful for support):
Version: 2.2.4
Commit: f95848e524
.NET Core SDKs installed:
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.103 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.400 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.1.505 [C:\Program Files\dotnet\sdk]
2.2.203 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: