This repository was archived by the owner on Nov 30, 2023. It is now read-only.
This repository was archived by the owner on Nov 30, 2023. It is now read-only.
How to fix OmniSharp broken in dotnet 3.1 image #1474
Open
Description
- VSCode Version: 1.67.2
- Local OS Version: macOS 12.4
- Local chip architecture: Apple Silicon
- Reproduces in: Codespaces
- Name of Dev Container Definition with Issue: dotnet
Steps to Reproduce:
- Create a codespace from https://github.com/microsoft/vscode-remote-try-dotnetcore
- Open
Program.cs
after the C# extension is installed (the extension might require a reload to fully activate) - See this error in the output:
Starting OmniSharp server at 5/25/2022, 6:57:38 PM
Target: /workspaces/vscode-remote-try-dotnetcore
[ERROR] Error: Found dotnet version 3.1.419. Minimum required version is 6.0.100.
- 🐛 OmniSharp doesn't load, and IntelliSense is broken
Notes
This appears to be due to a breaking change in the latest OmniSharp release which will require compensating changes in either the image or the template: dotnet/vscode-csharp#5120 (comment)
v1.25.0 has shipped with this change. A .NET 6 SDK is required when running with "omnisharp.useModernNet" set to "true", which is the default configuration.
Either we should include a newer .NET 6 SDK on all versions of the .NET devcontainer images in order to allow OmniSharp to work, or we should add a setting for .NET versions <6 to set "omnisharp.useModernNet": false
to workaround.