vscode-csharp: Omnisharp can not find assembly netstandard

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. File name: ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.<Main>b__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. File name: ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ at OmniSharp.Stdio.Driver.Program.<>c__DisplayClass0_1.<Main>b__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].

Post the output from Output-->OmniSharp log here

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: e5bab63eca

Runtime 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
Extension Author Version
csharp ms-vscode 1.18.0
dotnet-test-explorer formulahendry 0.6.6
EditorConfig EditorConfig 0.13.0
vscode-nuget-package-manager jmrog 1.1.6

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 25 (4 by maintainers)

Most upvoted comments

I am getting this on Mac since upgrading to .NET Core 3.0

I have the same issue, but on linux

I think this is fixed if you install fsharp for Linux. Sorry, I installed a TON of stuff but I think that’s the one that did it.

This happened again after todays update… sighs

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

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 apt install mono-devel will install Mono 5.18 which is the latest that is standard available for Debian 10. When using the special instructions from https://mono-project.com, I receive Mono 6.4, which is the latest version they offer for Debian 10.

Neither of which solves the problem.

Nevermind, I must have done something wrong. A reinstall of mono-devel 6.4 after adding the https://mono-project.com repositories did take a lot longer and LLVM was used to compile a lot of Mono 4.5 libraries (Why? I have no clue.) but afterwards everything worked again.

Still this is strange, as I have never before had to install mono-devel, as the version that comes with the C# extension for Visual Studio Code normally worked fine.

Same issue, resolved disabling update and installing 1.18.0