dotnet --info output:
.NET Core SDK (reflecting any global.json):
Version: 2.2.102
Commit: 96ff75a873
Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: arch-x64
Base Path: /opt/dotnet/sdk/2.2.102/
Host (useful for support):
Version: 2.2.1
Commit: 878dd11e62
.NET Core SDKs installed:
2.2.102 [/opt/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.1 [/opt/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version:
1.30.2
C# Extension version:
1.17.1
Create new console project using dotnet new console, open VSCode either via start menu or command line.
Projects loads fine
Omnisharp loads and displays the mentioned issue above.
I found at least a workaround to fix this issue when opening VSCode via command line.
Unfortunately I haven't yet found a way to solve it when starting via start menu.
Fix:
MSBuildSDKsPath=/opt/dotnet/sdk/2.2.102/Sdks<Project Sdk="Microsoft.Net.Sdk"> with <Project Sdk="Microsoft.NET.Sdk"> (uppercased Net)I'm using Arch Linux with KDE, pretty clean/new system.
Used latest Ubuntu before, no problems at all.
Although the workaround works for now, I guess it will break everytime a different SDK version gets used.
Create the file /etc/profile.d/dotnet.sh
export DOTNET_ROOT=/opt/dotnet
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
export PATH=${PATH}:${DOTNET_ROOT}
Found here: https://bugs.archlinux.org/task/60903?project=5&string=dotnet-host
Same thing happens to me on Solus. I created an Arch Linux VM to test if it still occurs, and it does - looks exactly the same.
MSBuildSDKsPath fixed the issue.DOTNET_ROOT is set, the Razor server crashes. I tried to find the root of the issue, but even the verbose mode did not show me anything. I just disabled it.@nickelghost Did you install the official Microsoft VS Code from https://code.visualstudio.com/? Debugging is only supported in the official version (not the open source version).
Unfortunately, VS Code seems to have broken the reporting for the error that the debugger sends back about this.
@gregg-miskelly I'm using the version from my distro's repository, so I guess it's the unofficial version. How come debugging is disabled on the open source version? I thought Microsoft <3 Open Source...
The debugger is considered part of Visual Studio, so it is only licensed to run in official Microsoft products.
@gregg-miskelly Is it open source then but under a different license? Or is it a closed source part of Microsoft's build?
If it is open, is there a way to get it working with the open vscode?
The debugger is closed source.
I had this exact same issue. Was using the visual studio code from AUR on my computer (Manjaro) and the error kept coming up. However, @virtualdreams solution fixed it.
The issue is being tracked in dotnet/cli#12110.
As mentioned, tracked by https://github.com/dotnet/cli/issues/12110. See https://github.com/OmniSharp/omnisharp-vscode/issues/3160 for more details.
this resolved mine
https://github.com/dotnet/corefx/issues/41481#issuecomment-555555762
Most helpful comment
Create the file
/etc/profile.d/dotnet.shFound here: https://bugs.archlinux.org/task/60903?project=5&string=dotnet-host