tintoy / msbuild-project-tools-vscode

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

Plugin won't start with DotNet 5.0.0 #71

Closed ncallister closed 3 years ago

ncallister commented 3 years ago

I have recently upgraded my DotNet SDK to 5.0.0 after which the MSBuild language service plugin won't start.

Output:

Starting MSBuild language service...
Failed to start the MSBuild language server.
Error: Command failed: "/snap/bin/dotnet" "/home/nathan/.vscode/extensions/tintoy.msbuild-project-tools-0.3.10/out/language-server/MSBuildProjectTools.LanguageServer.Host.dll" --probe
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.0.0' was not found.
  - The following frameworks were found:
      5.0.0 at [/snap/dotnet-sdk/105/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.0.0&arch=x64&rid=ubuntu.18.04-x64
tintoy commented 3 years ago

Hi - the plugin is built against v3.0.x of the .NET core runtime (it still has to work for people who haven't upgraded yet). You can install the 5.0.0 SDK and the plugin will work with projects that use it, but you will also need the 3.0.x runtime installed to run the plugin.

Installation instructions depend on your particular distro but they will be similar to the 5.x ones (you only need the 3.x runtime, not the 3.x SDK).

https://docs.microsoft.com/en-au/dotnet/core/install/linux

Note that, while they mention 3.0.x is now out of maintenance, the packages for it are still available to download and install.

I'll be upgrading the extension to use the 3.1 or 5.0 runtime in the next couple of weeks once I've had time to work out which is going to be most compatible for existing users 🙂

tintoy commented 3 years ago

Will be implemented by tintoy/msbuild-project-tools-server#20.

tintoy commented 3 years ago

Published v0.3.12 of the extension (which now targets 5.0).

Sorry for the delay; had to find time to set up VMs for testing with multiple versions :)