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

vscode doesn't detect the dotnet SDK installed via package manager (Fedora Linux) #2112

Open
SingingBush opened this issue Jan 30, 2025 · 2 comments
Labels

Comments

@SingingBush
Copy link

Describe the bug.

Install dotnet using sudo dnf install dotnet-sdk-9.0 which installs the following:

Package                                               Arch         Version
Installing:
 dotnet-sdk-9.0                                       x86_64       9.0.102-1.fc41
Installing dependencies:
 aspnetcore-runtime-9.0                               x86_64       9.0.1-1.fc41
 aspnetcore-targeting-pack-9.0                        x86_64       9.0.1-1.fc41
 dotnet-apphost-pack-9.0                              x86_64       9.0.1-1.fc41
 dotnet-host                                          x86_64       9.0.1-1.fc41
 dotnet-hostfxr-9.0                                   x86_64       9.0.1-1.fc41
 dotnet-runtime-9.0                                   x86_64       9.0.1-1.fc41
 dotnet-targeting-pack-9.0                            x86_64       9.0.1-1.fc41
 dotnet-templates-9.0                                 x86_64       9.0.102-1.fc41
 netstandard-targeting-pack-2.1                       x86_64       9.0.102-1.fc41

open vscode but it appears not to support v9.0:

Image

So I installed v8 using sudo dnf install dotnet-sdk-8.0 which has less dependencies:

Package                                             Arch       Version
Installing:
 dotnet-sdk-8.0                                     x86_64     8.0.405-1
Installing dependencies:
 aspnetcore-runtime-8.0                             x86_64     8.0.12-1.fc41
 aspnetcore-targeting-pack-8.0                      x86_64     8.0.12-1.fc41
 dotnet-apphost-pack-8.0                            x86_64     8.0.12-1.fc41
 dotnet-hostfxr-8.0                                 x86_64     8.0.12-1.fc41
 dotnet-runtime-8.0                                 x86_64     8.0.12-1.fc41
 dotnet-targeting-pack-8.0                          x86_64     8.0.12-1.fc41

and reload vscode but .Net 8.0 is not detected either.

Ideally it should have worked with v9 but also if not detected automatically it would be better to allow the user to specify the directory path required.

Note that in the log it finds the installed SDKs:

.NET SDKs installed:
  9.0.102 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.12 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.1 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.12 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.1 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

but yet still results in:

30/01/2025, 20:35:47 DotnetVersionResolutionError
Error
An active-support version of dotnet couldn't be found. Discovered versions: []
 Error: An active-support version of dotnet couldn't be found. Discovered versions: []
        at /home/*********/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.6/dist/extension.js:2:9718
        at Generator.next (<anonymous>)
        at s (/home/********/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.6/dist/extension.js:2:4678)
null

Please attach log file(s) here if you have any.

The command "/usr/lib64/dotnet/dotnet" --info exited
with signal: undefined.

30/01/2025, 20:35:46 CommandExecutionStdOut
The command "/usr/lib64/dotnet/dotnet" --info encountered stdout:
.NET SDK:
 Version:           9.0.102
 Commit:            1cf154a56d
 Workload version:  9.0.100-manifests.f12a3708
 MSBuild version:   17.12.18+1cf154a56

Runtime Environment:
 OS Name:     fedora
 OS Version:  41
 OS Platform: Linux
 RID:         fedora.41-x64
 Base Path:   /usr/lib64/dotnet/sdk/9.0.102/

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.1
  Architecture: x64
  Commit:       1cf154a56d

.NET SDKs installed:
  9.0.102 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.12 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.1 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.12 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.1 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

...

30/01/2025, 20:35:47 DotnetVersionResolutionError
Error
An active-support version of dotnet couldn't be found. Discovered versions: []
 Error: An active-support version of dotnet couldn't be found. Discovered versions: []
        at /home/*********/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.6/dist/extension.js:2:9718
        at Generator.next (<anonymous>)
        at s (/home/*******/.vscode/extensions/ms-dotnettools.vscode-dotnet-runtime-2.2.6/dist/extension.js:2:4678)
null

Reproduction Steps

install dotnet and this vscode plugin on Fedora

Expected Behavior

it should detect the installed SDK

Exceptions & Errors (if any)

see above

.NET Install Tool Version

v2.2.6

Your operating system? Please provide more detail, such as the version and or distro above.

Linux

VS Code Version

1.96.4

@nagilson
Copy link
Member

Thanks for your detailed and well organized report. Sorry for the delayed reply.

That UI is for installing the SDK without using the terminal.
That is not supported in Fedora so Im surprised it shows the UI at all. We would take community contributions to add that support. See our documentation on distro support.

It can still detect your SDK for actual use of C# and C# DevKit, at least it should -- that is separate logic. That message is a little misleading because its just talking about SDKs it can install. Since it doesn't have logic for fedora it can't find anything to install. But it should be able to find your install when its actually running. If it didnt, no features of C#DK will work.

@nagilson nagilson added ux and removed untriaged labels Feb 12, 2025
@SingingBush
Copy link
Author

Ok thanks. I'll probably take a look at making the required changes but not sure how soon that'll be.

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

No branches or pull requests

2 participants