As of about 10 days ago the language server needs .NET SDK 5.0.102 installed in order to start, but you can target any SDK you want in your project. This took effect in release 0.3.12 of the VS Code plugin.
Unfortunately, from an end user perspective, the error message is slightly confusing. First VS Code pops up a note saying the language server couldn't start and you should check the logs. Then in the logs you get a message like this:
Error: Command failed: "/usr/local/share/dotnet/dotnet" "/Users/tillig/.vscode/extensions/tintoy.msbuild-project-tools-0.3.12/out/language-server/MSBuildProjectTools.LanguageServer.Host.dll" --probe
System.Exception: Cannot locate MSBuild engine for .NET SDK v5.0 (5.0.102 <= SDK version <= 5.0.999). Found version(s): [5.0.100].
at MSBuildProjectTools.LanguageServer.Program.DiscoverMSBuildEngine() in C:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer\Program.cs:line 198
at MSBuildProjectTools.LanguageServer.Program.Main() in C:\Development\github\tintoy\msbuild-project-tools-vscode\lib\server\src\LanguageServer\Program.cs:line 51
It was confusing to me both why it was trying to locate that version of .NET 5 (I have 5.0.100, it couldn't use that?) and also why it was looking for .NET 5 at all since the project where I discovered this was targeting .NET Core 3.1. After looking into how the project build tools work and seeing the changes, now I get it, but I'm curious if the error message could be improved with some sort of "call to action" explaining what's up.
Like, instead of just an exception and that's it, maybe a longer message saying what the readme says - you need to have .NET 5.0.102 (or compatible) installed, but you can target whatever you want... and here's a link to go download the latest SDK.
Or maybe the error message has a URL to an FAQ over here on GitHub that explains what it means and why.
Point being, it would be nice to have a slightly more helpful message that doesn't require research into how the language server works, if possible.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4