Skip to content
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

Issue: Cannot locate MSBuild engine for .NET SDK v9.0.100 #157

Closed
jrdodds opened this issue Aug 15, 2024 · 5 comments
Closed

Issue: Cannot locate MSBuild engine for .NET SDK v9.0.100 #157

jrdodds opened this issue Aug 15, 2024 · 5 comments

Comments

@jrdodds
Copy link

jrdodds commented Aug 15, 2024

With Visual Studio 2022 Preview installed, the .NET SDK 9.0.100-preview is installed and MSBuild Project Tools for Visual Studio Code fails with the following output:

System.Exception: Cannot locate MSBuild engine for .NET SDK v9.0.100. This probably means that MSBuild Project Tools cannot find the MSBuild for the current project instance. It did find the following version(s), though: [8.0.400, 8.0.304, 7.0.410, 6.0.425].
   at MSBuildProjectTools.LanguageServer.Utilities.MSBuildHelper.DiscoverMSBuildEngine(String baseDirectory, ILogger logger)
   at MSBuildProjectTools.LanguageServer.Program.Main()
[Error - 10:44:20 AM] Server process exited with code 1.
[Error - 10:44:20 AM] Connection to server got closed. Server will not be restarted.
[Error - 10:44:20 AM] MSBuild Language Service client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 

The command dotnet --list-sdks reports:

6.0.425 [C:\Program Files\dotnet\sdk]
7.0.410 [C:\Program Files\dotnet\sdk]
8.0.304 [C:\Program Files\dotnet\sdk]
8.0.400 [C:\Program Files\dotnet\sdk]
9.0.100-preview.7.24407.12 [C:\Program Files\dotnet\sdk]
@tintoy
Copy link
Owner

tintoy commented Aug 15, 2024

Hi , thanks for reporting!

I suspect that this may be the same issue as #144 . While it was partially addressed by #152, we still don’t have great support for preview versions but our next release has some additional improvements that may help (using preview runtimes / SDKs is always a bit of an unknown quantity for us since it depends whether the new ones are backward-compatible with the one we built against).

I’m hoping to put our new release together this weekend 🙂

CC: @DoctorKrolic

@jrdodds
Copy link
Author

jrdodds commented Aug 16, 2024

Yes, it seems to be related to #144. Thanks

@jrdodds
Copy link
Author

jrdodds commented Aug 18, 2024

Resolved by #158 (Release v0.6.5)

Output for "MSBuild Project Tools" reports:

Starting MSBuild language service...
Using .NET runtime from the host
MSBuild language service is running.

And output for "MSBuild language service" reports "Using MSBuild engine v9.0.100 from "C:\Program Files\dotnet\sdk\9.0.100-preview.7.24407.12"."

@jrdodds
Copy link
Author

jrdodds commented Aug 18, 2024

Resolved by #158 (Release v0.6.5)

@jrdodds jrdodds closed this as completed Aug 18, 2024
@tintoy
Copy link
Owner

tintoy commented Aug 18, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants