.NET SDK's Not Installing Correctly by Visual Studio Installer

504 views Asked by At

I am getting an issue with installing the .NET SDK using Visual Studio Installer.

In the list I chose the .NET 5, .NET Core 3.1 and .NET Core 2.1 SDKs and installed them, but when I use dotnet --info, I only see .NET 7 installed with Visual Studio 2022.

result of dotnet --info

Here you can see my Visual Studio vs JetBrains Rider (rider can't see SDK like CMD)

visual studio create project screenshot

jb rider create project screenshot

I tried to reinstall the SDKs in Visual Studio Installer but it does not have any effect.

I checked the dotnet folder in C:/ProgramFiles/dotnet and there is only .NET 7 SDK in it.

I checked my environment variables and PATH for x64 located above x86.

1

There are 1 answers

0
terodaktil On

In order to see what you have installed try out these commands as well

dotnet --list-sdks
dotnet --list-runtimes

In my case Visual Studio doesn't need all of the different sdks it only needs the runtimes. Rider probably has to have the appropriate sdks.

Here is my output of these commands: enter image description here

If you have only the runtimes, you will need to install the sdks manually. For that you can get instructions here: https://stackoverflow.com/a/63752429/15439848

I think you have only the runtimes installed. As they are the only thing listed in the visual studio installer along with a .NET general SDK.