6

at VSCode launch today I'm receiving this error:

Starting OmniSharp server at 27/5/2022, 12:37:25
    Target: f:\UnityProjects\MyGame.sln
[ERROR] Error: Found dotnet version 5.0.407. Minimum required version is 6.0.100.

I read that there have been updates in omnisharp but I really don't know how to fix the issue. I've installed dotnet 6.0 TLS through a new visual studio installation... is there anything else I can do to bring dotnet working with my Unity project?

2
  • What does dotnet --version say?
    – shingo
    Commented May 27, 2022 at 11:07
  • @shingo actually it says 5.0.407... I've run the visual studio installer selecting dotnet 6.0 TLS :/
    – MatterGoal
    Commented May 27, 2022 at 12:09

2 Answers 2

12

If you're using C# extension 1.25.0 or higher, they announced a change in the extension's details page:

.NET Framework builds of OmniSharp no longer ship with Mono or the MSBuild tooling (See announcement omnisharp-roslyn#2339). To ensure that the C# extension remains usable out of the box for .NET SDK projects, we have changed the default value of omnisharp.useModernNet to true.

If you still need Unity or .NET Framework support, you can set omnisharp.useModernNet to false in your VS Code settings and restart OmniSharp.

Changing that omnisharp.useModernNet setting to false worked for me.

2
  • Huh, so crazy that they disabled Unity support for C# by default! Seems to be a misguided assumption that people won't need it...
    – Kokodoko
    Commented May 29, 2022 at 11:14
  • I think it's because of the move to 6.0+ and the launch of VS 2022 which includes .NET 6. Definitely an inconvenience. I am updating VS Mac to see if I can resolve it without configuration changes
    – Felipe
    Commented May 30, 2022 at 12:57
4

If you use vscode for web development and your installed dotnet SDK version is < 6, this answer might be useful.

After quite some time I spotted an Ominisharp Log warning this.

[ERROR] Error: Found dotnet version 3.1.419. Minimum required version is 6.0.100.

Solution

Install dotnet SDK 6 alongside or by replacing your current version.

I recommend you install it by using the dotnet-install.{sh | ps1} script.

By running the command below it will install the latest version alongside your current one.

sudo ./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet

~ » dotnet --list-sdks                                                                                                       
3.1.419 [/usr/share/dotnet/sdk]
6.0.300 [/usr/share/dotnet/sdk]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.