-
Notifications
You must be signed in to change notification settings - Fork 680
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
Wrong DOTNET_ROOT inferring on OSTree-style .NET installations #6239
Comments
If a .net7 SDK is available on your path, we should be able to use it. We look for the location of that Can you share the C# output window logs? Preferably with the |
The issue is that the fetching for the DOTNET_ROOT is incorrect for OSTree-style installations, in NixOS' case, the path for I'll fetch the C# output window logs shortly |
@dibarbet here's the C# output window logs with As well as the dotnet --info output
Something that might be useful, is that UPDATE: it seems that following links further has been done in #6230, so after updating to 2.0.436 the double |
Yup as you mention we should now be looking at where the Note - while there are potentially more cases we can consider here for dotnet resolution, unless they're extremely motivating we're not going to be able to handle them all automatically. There's just so many different possible configurations of dotnet installations out there that it's basically chasing an infinite rabbit hole. For those real edge cases, we expect a combination of
to cover the rest. |
Yes it does indeed work, I was able to remove the workaround I had implemented for it
This is not really an option in NixOS as libc, icu and even the ELF interpreter are not in standard locations, so all binaries need to be patched to work on it, maybe a setting to specify DOTNET_ROOT (or using the one from the process env instead of trying to find it again) would be a fix-all solution (in case the one in
This also doesn't work because if the actual path were inside a |
In this case, the |
Oh, I see, fair enough then, my bad |
Going to close this as I think the original problem is fixed and we're not planning on taking additional action here |
Environment data
VSCode version: 1.81.1
C# Extension: 2.0.413
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.100-preview.5.23303.2 Commit: 3fe444af72Runtime Environment:
OS Name: nixos
OS Version: 23.11
OS Platform: Linux
RID: linux-x64
Base Path: /nix/store/4bj5f8yjjim8wryazs31ix0npcwilpwp-dotnet-sdk-8.0.100-preview.5.23303.2/sdk/8.0.100-preview.5.23303.2/
.NET workloads installed:
There are no installed workloads to display.
Host:
Version: 8.0.0-preview.5.23280.8
Architecture: x64
Commit: bc78804f5d
.NET SDKs installed:
6.0.412 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/sdk]
7.0.306 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/sdk]
8.0.100-preview.5.23303.2 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.20 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.9 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-preview.5.23302.2 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.20 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.9 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-preview.5.23280.8 [/nix/store/5ddzdgh38p44zf5ijqfdxzndijzgw5wd-dotnet-core-combined/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Steps to reproduce
Expected behavior
Extension detects that the
dotnet
binary is in thebin
dir and goes up another directory to getDOTNET_ROOT
.Actual behavior
Binary fails to launch with "Install .NET to run this binary" because of the wrong
DOTNET_ROOT
location.Additional context
I have implemented a fix in the build script for my system however it'd be best if this were solved upstream.
The text was updated successfully, but these errors were encountered: