Closed DoctorKrolic closed 3 months ago
Tested on my PC with .NET 9 preview installed, and I can confirm, that this PR still needs work in 2 main points:
dotnet --version
returns version of a latest SDK, not the runtime. So we actually need to parse result of dotnet --list-runtimes
and pick up the latest onedotnet
will pick up the closest available one. So e.g. I have both .NET 8 and .NET 9 preview installed and if I just use host dotnet
it picks up .NET 8 runtime, making all effort of using host dotnet
somewhat unnecessary. So we need to use --fx-version
to force it to use the latest version of dotnet
available on the PC@tintoy After looking at this again, I changed my mind a bit. I think, it is actually too unsafe to just grab the most recent runtime user have installed. I would say, this should be a conscious choice os the user rather than the default behavior. However, this PR still has a value of its own: now if user has appropriate runtime, the extension will pick it up instead of downloading an isolated one. I think, we can merge this and work on server reloading with newer version of the runtime later.
I would say, this should be a conscious choice os the user rather than the default behavior
Yeah - I’m a big fan of opt-in for newer behaviour (whether ours or that of a downstream dependency) so definitely agree 🙂
Related to https://github.com/tintoy/msbuild-project-tools-vscode/issues/144