-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP server fails to initialize with: "Failed to find all versions of .NET Core MSBuild. Call to hostfxr_resolve_sdk2." #7208
Comments
@keyboardDrummer typically the error you're seeing is related to a misconfiguration or corrupt dotnet installation. Can you confirm a few things?
|
I can reproduce this in two other environments on my own project (not Roslyn). Please let me know if I can help by providing more info. WSLFacing the same issue inside a Debian WSL. Environment$ dotnet --info
.NET SDK:
Version: 8.0.301
Commit: 1a0e9c0300
Workload version: 8.0.300-manifests.f6879a9a
MSBuild version: 17.10.4+10fbfbf2e
Runtime Environment:
OS Name: debian
OS Version: 12
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.301/
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
.NET SDKs installed:
8.0.301 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download Error log
More InfoI tried to find out if the right version of the extension is installed, but apparently that is not possible with WSL. I can only tell you that UbuntuFacing the same issue on Ubuntu. Environment$ dotnet --info
.NET SDK:
Version: 8.0.301
Commit: 1a0e9c0300
Workload version: 8.0.300-manifests.f6879a9a
MSBuild version: 17.10.4+10fbfbf2e
Runtime Environment:
OS Name: ubuntu
OS Version: 20.04
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/8.0.301/
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
.NET SDKs installed:
6.0.423 [/usr/share/dotnet/sdk]
8.0.301 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.31 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.31 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download Error logs
More infoI have |
Is this in any way related to #6335? |
Possibly, but unlikely I think. @KnorpelSenf can you set Additionally, via what method did you originally install the SDK (e.g. install scripts, snap package, etc)? |
And - if you could share the values set for the following environement variables (if any)
|
I am no longer able to reproduce it in any of the two environments. The error no longer appears in the logs. My project is loaded correctly, and so far, all basic LSP features work flawlessly (goto definition, find all references, variable highlighting etc). I tried to check your git log if something relevant appears there ... but it's honestly a bit of a mess there so I did not investigate this further. Seems fixed anyway, so thanks! |
Ah, great to here it works at least! Yeah if everything is working there probably won't be anything useful in the logs. Going to close this issue then. |
Yep, agree. Will report back if the problem reappears. |
I have seen this message when the global.json is pinning an SDK version that isn't installed. |
Environment data
dotnet --info
output:VS Code version: 1.89.1
C# Extension version: v2.31.19
OmniSharp log
Steps to reproduce
./build.sh --restore
and./build.sh --build
Expected behavior
C# extension starts successfully
Actual behavior
Code editor features such as go to definition are not working
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: