Closed glen-84 closed 7 months ago
Thanks - will investigate shortly! Can you post the output of dotnet --info
?
same here (on macOS 14.1.1):
% "/Users/adam/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~arm64/dotnet" \
"/Users/adam/.vscode/extensions/tintoy.msbuild-project-tools-0.5.0/language-server/MSBuildProjectTools.LanguageServer.Host.dll" \
--probe
System.InvalidOperationException: The 'dotnet --version' command did not return any output.
at MSBuildProjectTools.LanguageServer.Utilities.DotNetRuntimeInfo.ParseDotNetVersionOutput(TextReader dotnetVersionOutput)
at MSBuildProjectTools.LanguageServer.Utilities.DotNetRuntimeInfo.GetCurrent(String baseDirectory, ILogger logger)
at MSBuildProjectTools.LanguageServer.Utilities.MSBuildHelper.DiscoverMSBuildEngine(String baseDirectory, ILogger logger)
at MSBuildProjectTools.LanguageServer.Program.Main()
For dotnet --info
% "/Users/adam/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~arm64/dotnet" \
--info
global.json file:
Not found
Host:
Version: 6.0.25
Architecture: arm64
Commit: 492abbeef0
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.NETCore.App 6.0.25 [/Users/adam/Library/Application Support/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~arm64/shared/Microsoft.NETCore.App]
Download .NET:
https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
Thanks - will investigate shortly! Can you post the output of
dotnet --info
?
/home/glen/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/dotnet --info
global.json file:
/home/glen/projects/api/global.json
Host:
Version: 6.0.25
Architecture: x64
Commit: 492abbeef0
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.NETCore.App 6.0.25 [/home/glen/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/shared/Microsoft.NETCore.App]
Download .NET:
https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info
/home/glen/.vscode-server/data/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/6.0.25~x64/dotnet --version
The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application '--version' does not exist.
* You intended to execute a .NET SDK command:
A compatible .NET SDK was not found.
Requested SDK version: 8.0.100
global.json file: /home/glen/projects/api/global.json
Installed SDKs:
No .NET SDKs were found.
Install the [8.0.100] .NET SDK or update [/home/glen/projects/api/global.json] to match an installed SDK.
Download a .NET SDK:
https://aka.ms/dotnet-download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
Same here (Windows11/WSL2, Dev Containers)
Just for now (so we don't affect anyone else while we investigate), I have rolled back to the previous version (v0.4.9) by publishing it as v0.5.1. The new package should appear in the gallery soon.
@AdamCoulterOz and @glen-84 - it seems to indicate that there are no .NET SDKs installed on your system, is that correct? Or is this just a result of running it from that location?
If you remove the path prefix from the dotnet
command, do you get different output?
@DoctorKrolic - from the output above, it seems that the .NET runtime acquired via the vscode-dotnet-runtime
extension is isolated and does not see any of the .NET SDKs installed the regular way...
Is this the behaviour that you've seen while working with it?
@Martin521 - do you have the .NET SDK installed your dev container?
@AdamCoulterOz and @glen-84 - it seems to indicate that there are no .NET SDKs installed on your system, is that correct? Or is this just a result of running it from that location?
The latter. (I have SDKs installed)
If you remove the path prefix from the
dotnet
command, do you get different output?
Yes.
@glen-84 - ok, thanks, it sounds like we need to find a way to locate the global dotnet
executable and associated SDKs after the extension has been loaded by the isolated runtime.
Also, not sure why it installs .NET 6.
Also, not sure why it installs .NET 6.
I think that's because it's the version that the language server was built against.
@DoctorKrolic - this might do the trick:
together with:
@Martin521 - do you have the .NET SDK installed your dev container?
Yes, 8.0.0-rc.1.23419.4 (Config here)
I've got 8.0.100 installed
I made a PR which sould resolve this. I described what exactly happened and why we were not able to catch this during development there. In the meantime I apologize for the inconvenience. There are only 2 of us maintaining the extension, so we don't have enough resources to cover all cases when testing. Thanks for patience and the contribution, your logs and other info were pretty useful!
Yeah, sorry I should have been more thorough when testing the new changes; I don’t have a Mac anymore but I normally try to smoke-test each release in WSL and dev containers before publishing.
(I’ve spent too much time this month fighting kops and terraform so I’ve been a little distracted 😂)
Thanks to both of you for providing this great extension and for the quick reaction!
WSL (Debian) on Windows 11.