I have Microsoft .NET SDK 5.0.102 (x64) installed on my Windows 10, but when I do dotnet --list-sdks
nothing shows up? I could see the SDK installed from Windows Apps & features. Thank you.
Edit:
Doing dotnet --info
shows the following
$ dotnet --info
Host (useful for support):
Version: 5.0.2
Commit: cb5f173b96
.NET SDKs installed:
No SDKs were found.
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.11 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.2 [C:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.11 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).
NET are installed to the normal C:\Program Files\dotnet\ folder. However, when you install the x64 version of . NET 6 SDK, it's installed to the C:\Program Files\dotnet\x64\ folder.
The documented way to check the version is to launch dotnet --info or dotnet --list-runtimes and inspect the results.
Removing c:\Program Files (x86)\dotnet\dotnet.exe
from global System Variables Path helps for me.
There are multiple .NET installations on your system and they are getting mixed up.
You have one installation that's x86 (C:\Program Files (x86)
) - and has no SDK - and another that's x64 - and has the 5.0.102 SDK.
When you run dotnet
, you seem to be running the x86 version.
The SDK you have installed is the x64 version.
You should try and figure out which architecture you need and uninstall the other one.
CHECK YOUR ENVIRONMENT VARIABLES!
I just ran into this issue and discovered that some how my C:\Program Files (x86)\dotnet\
environment variable was above my C:\Program Files\dotnet\
which meant that whenever I ran the dotnet
command it was using the x86 version.
See Windows or Visual Studio can't find the latest installed .NET SDK
If the first SDK installed on the machine is a different bit size, you won't see the latest SDK
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With