Linux (Debian 10): System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
See original GitHub issueIssue Description
When starting Visual Studio Code, the following message appears in the log:
System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
I’m using Debian 10, which I realize is not yet officially supported. If you feel like that might be the cause and don’t have the resources to investigate I understand.
Steps to Reproduce
Open a folder with a C# Solution in Visual Studio Code on an updated instance of Debian 10.
Expected Behavior
Omnisharp and thus Intellisense work.
Actual Behavior
Omnisharp server fails to start
Logs
OmniSharp log
OmniSharp server started with Mono 5.18.0. Path: /home/lufix/.vscode/extensions/ms-vscode.csharp-1.21.1/.omnisharp/1.34.2/omnisharp/OmniSharp.exe PID: 31312
System.IO.FileNotFoundException: Could not load file or assembly ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’ or one of its dependencies.
File name: ‘netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’
at OmniSharp.CommandLineApplication+<>c__DisplayClass11_0.<OnExecute>b__0 () [0x0000b] in <150636dc45ea41d3a8efdf330bb7b52f>:0
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute (System.String[] args) [0x00039] in <344a1e8cd6594b17b1e01f8df6ae8827>:0
at OmniSharp.CommandLineApplication.Execute (System.Collections.Generic.IEnumerable1[T] args) [0x00042] in <150636dc45ea41d3a8efdf330bb7b52f>:0 at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00028] in <ef67332970734dbbb15e5d0e9b13d144>:0 at OmniSharp.HostHelpers.Start (System.Func
1[TResult] action) [0x0001c] in <150636dc45ea41d3a8efdf330bb7b52f>:0
[ERROR] Error: OmniSharp server load timed out. Use the ‘omnisharp.projectLoadTimeout’ setting to override the default delay (one minute).
C# log
(blank)
Environment information
VSCode version: 1.38.0 C# Extension: 1.21.1
Mono Information
OmniSharp using global mono :5.18.0Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.401 Commit: 729b316c13Runtime Environment: OS Name: debian OS Version: 10 OS Platform: Linux RID: debian.10-x64 Base Path: /usr/share/dotnet/sdk/2.2.401/
Host (useful for support): Version: 2.2.6 Commit: 7dac9b1b51
.NET Core SDKs installed: 2.2.401 [/usr/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.6 [/usr/share/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 |
---|---|---|
cpptools | ms-vscode | 0.25.1 |
csharp | ms-vscode | 1.21.1 |
Go | ms-vscode | 0.11.4 |
mssql | ms-mssql | 1.6.0 |
vetur | octref | 0.22.2 |
vscode-wasm | dtsvet | 1.2.1 |
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
I have(/had) exactly the same issue, with pretty much the same setup (safe for the extensions).
Fix (option 1)
Change settings to:
Forces omnisharp to use the mono version packaged with omnisharp. Worked for me.
Fix (option 2)
Install the latest (stable) mono version from www.mono-project.com and keep
or
Also verified working (for me).
Possible(?) cause
According to github.com/OmniSharp/omnisharp-roslyn :
However; package.json states:
Could be just an documentation inconsistency though. Or there’s something wrong with the debian 10 mono package(s), but I didn’t look any further into that.
Debian 10: (default) mono 5.18.0.240
C# extension 1.21.3 / omnisharp 1.34.4-beta.6: mono 5.18.1.0
mono-project.com: mono 6.0.0.334
@dogguts thank you. This worked also for Pengwin.