OmniSharp Error: Found dotnet version 5.0.201. Minimum required version is 6.0.100

Viewed 6472

I use VS Code as my IDE. Today I saw in my C# files that I could no longer use things like "Go To Definition/Implementations" or hover over anything to get the path/type etc.

I found my Omnisharp console and saw they updated last night and there is an error:

Error: Found dotnet version 5.0.201. Minimum required version is 6.0.100.

I can't upgrade my dotnet because 6.0 is not compatible with the runtime in my project and on Mac M1, there are a lot of issues running multiple dotnet instances..

I guess its a bit of a rock and a hard place, anyone know how I can get around this issue?

5 Answers

This is a recent update to Omnisharp, which is used by the VS Code C# extension. Add this to your settings and restart the editor.

    "omnisharp.useModernNet": false,
    "omnisharp.path": "",

Also if you don't have Visual Studio installed you will likely need to install the Build Tools to get MSBuild: enter image description here

My understanding of the rationale behind this change is an optimization for modern vanilla c# projects over those using older versions (ie Unity). More info in this issue.

Revert your Omnisharp to previous version

enter image description here

Update 1.25.0 introduces newer OmniSharp build for .NET 6 which does not support non SDK style .NET projects but results in performance improvements. Fortunately you can disable this in the settings:

C# Extension Settings

Also, the C# extension no longer ships with an included Mono & MSBuild Tools. Download them here: Build Tools Worst case, you can revert to an older extension version.

I haved similar problem and i fixed like this:

Im using win7 and i have VS 2019 IDE which not supporting dotnet 6 cuz of that vs_installer not installing dotnet6 sdk, in result i cant use c# extension v1.25.0 in vs code, because omnisharp needs net6. I installed net 6 sdk to my win7 and problem is solved, now i can use c# extension v1.25.0 in vs code.

Related