Open keyboardDrummer opened 4 weeks ago
@keyboardDrummer typically the error you're seeing is related to a misconfiguration or corrupt dotnet installation. Can you confirm a few things?
ms-dotnettools.csharp-2.32.14-<platform>
)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.
Facing the same issue inside a Debian WSL.
$ 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
Using dotnet configured on PATH
Dotnet path: /usr/share/dotnet/dotnet
Activating C# standalone...
waiting for named pipe information from server...
[stdout] {"pipeName":"/tmp/3546031e.sock"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info - 11:43:51 AM] [Program] Language server initialized
[Info - 11:43:52 AM] [LanguageServerProjectSystem] Loading /home/steffen/git/visitour/visitour/VisiTour.sln...
[Error - 11:43:53 AM] [LanguageServerHost] Microsoft.CodeAnalysis.MSBuild.Rpc.RemoteInvocationException: An exception of type System.InvalidOperationException was thrown: Failed to find all versions of .NET Core MSBuild. Call to hostfxr_resolve_sdk2. There may be more details in stderr.
at Microsoft.CodeAnalysis.MSBuild.Rpc.RpcClient.InvokeCoreAsync(Int32 targetObject, String methodName, List`1 parameters, Type expectedReturnType, CancellationToken cancellationToken) in /_/src/Workspaces/Core/MSBuild/Rpc/RpcClient.cs:line 163
at Microsoft.CodeAnalysis.MSBuild.Rpc.RpcClient.InvokeAsync[T](Int32 targetObject, String methodName, List`1 parameters, CancellationToken cancellationToken) in /_/src/Workspaces/Core/MSBuild/Rpc/RpcClient.cs:line 114
at Microsoft.CodeAnalysis.LanguageServer.HostWorkspace.LanguageServerProjectSystem.OpenSolutionAsync(String solutionFilePath) in /_/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectSystem.cs:line 103
at Microsoft.CodeAnalysis.LanguageServer.HostWorkspace.LanguageServerProjectSystem.OpenSolutionAsync(String solutionFilePath) in /_/src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectSystem.cs:line 116
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 157
I 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 ms-dotnettools.csharp@2.34.12
is installed, but I don't know the platform of it.
Facing the same issue on Ubuntu.
$ 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
Using dotnet configured on PATH
Dotnet path: /usr/share/dotnet/dotnet
Activating C# standalone...
waiting for named pipe information from server...
[stdout] {"pipeName":"/tmp/f1b10a28.sock"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info - 12:13:46 PM] [Program] Language server initialized
[Info - 12:13:47 PM] [LanguageServerProjectSystem] Loading /home/SERVERFLS/steffen.trog/git/visitour/visitour/VisiTour.sln...
[Error - 12:13:47 PM] [LanguageServerHost] Microsoft.CodeAnalysis.MSBuild.RemoteInvocationException: An exception of type System.InvalidOperationException was thrown: Failed to find all versions of .NET Core MSBuild. Call to hostfxr_resolve_sdk2. There may be more details in stderr.
at Microsoft.CodeAnalysis.MSBuild.RpcClient.InvokeCoreAsync(Int32 targetObject, String methodName, List`1 parameters, Type expectedReturnType, CancellationToken cancellationToken) in /_/src/Workspaces/Core/MSBuild/Rpc/RpcClient.cs:line 162
at Microsoft.CodeAnalysis.MSBuild.RpcClient.InvokeAsync[T](Int32 targetObject, String methodName, List`1 parameters, CancellationToken cancellationToken) in /_/src/Workspaces/Core/MSBuild/Rpc/RpcClient.cs:line 113
at Microsoft.CodeAnalysis.LanguageServer.HostWorkspace.LanguageServerProjectSystem.OpenSolutionAsync(String solutionFilePath) in /_/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectSystem.cs:line 110
at Microsoft.CodeAnalysis.LanguageServer.HostWorkspace.LanguageServerProjectSystem.OpenSolutionAsync(String solutionFilePath) in /_/src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectSystem.cs:line 123
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, IMethodHandler handler, CancellationToken cancellationToken) in /_/src/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 148
I have ms-dotnettools.csharp-2.34.12-linux-x64
installed.
Is this in any way related to #6335?
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.