Kretchen001
Kretchen001

Reputation: 153

Visual Studio doesnt find the installed .net SDK

I have correctly installed the .Net SDK (Version 7) and in the "Program Files" folder it was shown. But when I start Visual Studio, it didnt find it and the Project-Map on the rightsight is empty.

Visual Studio Version 2022 is used.

A short instruction to fix it

Upvotes: 4

Views: 11536

Answers (4)

Adel Mourad
Adel Mourad

Reputation: 1547

This is what worked for me:

MS VS -> Tools -> Manage Preview Features -> Use previews of the .Net SDK -> Ok -> Restart MS VS.

enter image description here

enter image description here

enter image description here

Upvotes: 1

Tancrede Chazallet
Tancrede Chazallet

Reputation: 7245

I had that problem with macOS, here is the answer that saved me from Microsoft Team, which might apply to windows as well:

Hi, unfortunately Visual Studio for Mac needs you to specify the full path to the dotnet cli executable, not the directory, in Preferences - Build and Debug - SDK Locations - .NET Core - .NET Core Command line: /usr/local/share/dotnet/dotnet

Indeed I've tried to add /usr/local/share/dotnet/ or /usr/local/share/dotnet/sdk but forgot to try /usr/local/share/dotnet/dotnet duh.

Upvotes: 0

Brandon Barkley
Brandon Barkley

Reputation: 768

For anyone who isn't fixed by the accepted answer, another possibility is that you don't have an updated version of Visual Studio 2022. You must be >= 17.5 to support .NET 7.0.

Upvotes: 8

KnYL3R
KnYL3R

Reputation: 54

i had this problem before, my solution:

  1. close all vs-apps
  2. go to your Advanced System Settings --> Advanced --> Environment Variables
  3. Under System Variables you will find the entry "Path" --> edit this one
  4. move the "C:\Program Files\dotnet" entry on top of "C:\Program Files(x86)\dotnet"
  5. press ok and restart vs

hope that resolves the issue

Upvotes: 2

Related Questions