Support prerelease .NET SDKs on .NET 6
rainersigwald opened this issue · 1 comments
Issue Description
Steps to Reproduce
Have a prerelease .NET SDK installed (I got mine via VS internal preview builds) and opt into O# on .NET 6 per https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.23.18-beta2.
Expected Behavior
Working
Actual Behavior
Starting OmniSharp server at 12/7/2021, 9:14:54 AM
Target: s:\play\xunit_templ
[ERROR] Error: Unknown result output from 'dotnet --version'. Received 6.0.200-preview.21573.3
Logs
OmniSharp log
[ERROR] Error: Unknown result output from 'dotnet --version'. Received 6.0.200-preview.21573.3
C# log
Environment information
VSCode version: 1.62.3
C# Extension: 1.23.18
Dotnet Information
.NET SDK (reflecting any global.json): Version: 6.0.200-preview.21573.3 Commit: a2bb0dde82Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.200-preview.21573.3\
Host (useful for support):
Version: 6.0.0
Commit: 4822e3c3aa
.NET SDKs installed:
5.0.209 [C:\Program Files\dotnet\sdk]
5.0.403 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21321.7 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21328.10 [C:\Program Files\dotnet\sdk]
6.0.100-rc.1.21410.3 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
6.0.200-preview.21573.3 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.1.21409.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21406.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-rc.1.21407.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
Extension | Author | Version |
---|---|---|
azure-account | ms-vscode | 0.9.11 |
azure-pipelines | ms-azure-devops | 1.195.0 |
better-toml | bungcip | 0.3.2 |
cmake | twxs | 0.0.17 |
cmake-tools | ms-vscode | 1.9.2 |
code-spell-checker | streetsidesoftware | 2.0.13 |
codesnap | adpyke | 1.3.4 |
codespaces | GitHub | 1.4.1 |
copilot | GitHub | 1.7.4016 |
cpptools | ms-vscode | 1.7.1 |
csharp | ms-dotnettools | 1.23.18 |
docs-article-templates | docsmsft | 0.2.11 |
docs-authoring-pack | docsmsft | 0.1.15 |
docs-build | docsmsft | 0.3.8 |
docs-images | docsmsft | 0.0.9 |
docs-linting | docsmsft | 0.0.8 |
docs-markdown | docsmsft | 0.2.100 |
docs-metadata | docsmsft | 1.0.7 |
docs-preview | docsmsft | 0.3.57 |
docs-scaffolding | docsmsft | 0.0.12 |
docs-yaml | docsmsft | 0.2.7 |
EditorConfig | EditorConfig | 0.16.4 |
errorlens | usernamehw | 3.4.1 |
gc-excelviewer | GrapeCity | 4.0.45 |
gistfs | vsls-contrib | 0.3.0 |
github-vscode-theme | GitHub | 5.1.0 |
gitlens | eamodio | 11.7.0 |
hexeditor | ms-vscode | 1.8.2 |
LinkCheckMD | blackmist | 0.3.1 |
markdown-all-in-one | yzhang | 3.4.0 |
mono-debug | ms-vscode | 0.16.2 |
powershell | ms-vscode | 2021.10.2 |
remote-containers | ms-vscode-remote | 0.205.2 |
remote-wsl | ms-vscode-remote | 0.58.5 |
remotehub | GitHub | 0.18.0 |
rewrap | stkb | 1.15.4 |
richcodenav | MS-RichCodeNav | 0.1.351 |
rust | rust-lang | 0.7.8 |
vscode-commons | redhat | 0.0.6 |
vscode-docker | ms-azuretools | 1.18.0 |
vscode-github-actions | cschleiden | 0.21.3 |
vscode-graphviz | joaompinto | 0.0.6 |
vscode-markdownlint | DavidAnson | 0.45.0 |
vscode-pull-request-github | GitHub | 0.32.0 |
vscode-xml | redhat | 0.18.1 |
vscode-yaml | redhat | 1.2.2 |
whatsprintisit | lszomoru | 0.0.1 |
This is a bug in the extension because it does not parse the version correctly, but even if it did, we would not be able to use MSBuild from a newer SDK than that for which OmniSharp was built.
The highest version OmniSharp can support is 6.0.100 because it aligns with its own NuGet dependencies it needs to load into process. A higher SDK would require higher NuGet versions and we'd crash. This is a known current limitation.
I guess the best we can do in short term is to limit the SDK search to 6.0.100 specifically. It would still not support higher SDKs than those for which OmniSharp would built, but it would at least not crash if you have newer + 6.0.100 installed at the same time.