tintoy / msbuild-project-tools-vscode

VS Code extension for MSBuild intellisense (including PackageReference completion).
MIT License
82 stars 16 forks source link

"Unable to start MSBuild language server" #96

Closed lszulc closed 2 years ago

lszulc commented 2 years ago

Hello,

After I launch the Visual Code env. I can see a warning in the lower right corner.

obraz

I don't know were to search for any clues regarding this issue.

tintoy commented 2 years ago

The drop-down in your screenshot that says “C#” should also contain one or more items named “MSBuild”. Usually the error details can be found in one of those output panes.

geniuskamo commented 2 years ago

@tintoy I have the same error, this is what i got.

`Starting MSBuild language service... Failed to start the MSBuild language server. Error: Command failed: "/home/codespace/.dotnet/dotnet" "/home/codespace/.vscode-remote/extensions/tintoy.msbuild-project-tools-0.4.3/out/language-server/MSBuildProjectTools.LanguageServer.Host.dll" --probe System.Exception: Cannot determine SDK version information for current .NET SDK (located at ''). at MSBuildProjectTools.LanguageServer.Utilities.MSBuildHelper.DiscoverMSBuildEngine(String baseDirectory, ILogger logger) in D:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer.Common\Utilities\MSBuildHelper.cs:line 101 at MSBuildProjectTools.LanguageServer.Program.Main() in D:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer\Program.cs:line 49

System.Exception: Cannot determine SDK version information for current .NET SDK (located at ''). at MSBuildProjectTools.LanguageServer.Utilities.MSBuildHelper.DiscoverMSBuildEngine(String baseDirectory, ILogger logger) in D:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer.Common\Utilities\MSBuildHelper.cs:line 101 at MSBuildProjectTools.LanguageServer.Program.Main() in D:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer\Program.cs:line 49`

tintoy commented 2 years ago

Hi - sorry for the delay, just saw this message.

I’ll take a look when I get home from work and get back to you 🙂

tintoy commented 2 years ago

BTW, are you using GitHub codespace?

tintoy commented 2 years ago

@geniuskamo and can you post the output of dotnet --info?

geniuskamo commented 2 years ago

BTW, are you using GitHub codespace?

Yes I am, is it some sort of settings sync issue ?

geniuskamo commented 2 years ago

@geniuskamo and can you post the output of dotnet --info?

.NET SDK (reflecting any global.json): Version: 6.0.201 Commit: ef40e6aa06

Runtime Environment: OS Name: ubuntu OS Version: 20.04 OS Platform: Linux RID: ubuntu.20.04-x64 Base Path: /opt/dotnet/6.0.201/sdk/6.0.201/

Host (useful for support): Version: 6.0.3 Commit: c24d9a9c91

.NET SDKs installed: 3.1.417 [/home/codespace/.dotnet/sdk] 6.0.201 [/home/codespace/.dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 3.1.23 [/home/codespace/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.417 [/home/codespace/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.3 [/home/codespace/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.201 [/home/codespace/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.23 [/home/codespace/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.417 [/home/codespace/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.3 [/home/codespace/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.201 [/home/codespace/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download

tintoy commented 2 years ago

If I understand it correctly, code spaces is VS Code on your local machine and the rest of the dev environment remotely on a VM they provide?

I don’t think we support VS Code Remote scenarios yet (extension is probably trying to run language server locally and not in VM). I’ll have a look into it this weekend and see if I can figure out what’s involved in supporting remote scenarios…

tintoy commented 2 years ago

Thanks for reporting! This work is now being tracked in #99.