Search code examples
visual-studio.net-coreinstallationsdkide

Unable to select .NET SDK in visual studio


I have an issue where I can't seem to select a SDK version for Visual Studio (17.6.3 (build 421)) no matter how many times I install it. I am working from a M1 Macbook Pro on Ventura 13.4. The project that I am working on utilizes .Net version 7.0.400. When I start visual studio I am treated to a popup that simply states that ".NET 7.0 SDK is required to build this application, and is not installed. Install the latest update to the .NET 7.0 SDK by visiting https://aka.ms/vs/mac/install-netcore7" and I am unable to run or update solutions and even syntax highlightning. This would be fine if it wasn't for the case that I already downloaded and installed the SDK. If I download and install the SDK again nothing changes; the popup still comes and I still can't run the application.

When verifying in the terminal I received the following:

❯ dotnet --version
7.0.400

When I try to the SDK locatioons from Visual Studio preferences I am first met with:Visual Studio preference window

But when I modify the location path I instead see: Visual Studio preference window with modified path

If I try to press okay and then open the preferences again it displays image 1 again and still nothing works.

I am confused by it giving me a SDK not found warning while at the same time listing the SDKs that I have installed.

Does anyone have any idea of what's going on and how to resolve this? I would switch over to either Rider or Windows but due to budget concerns that process is very slow.


Solution

  • I missed one thing with the SDK path. It needed to be /usr/local/share/dotnet/dotnet. I figure that last dotnet in the pass actually is a dotnet.exe that needed to be specified.