mauivisual-studio-2022visual-studio-mac-2022

Visual Studio 2022 (Mac): "Unsupported .NET installation detected"


I've got a fresh install of Visual Studio for Mac (latest version) and I created a hello world .NET MAUI application. VS complains that I've got an unsupported .NET installation.

enter image description here

I've got 7.0 and 6.0 installed on this machine:

enter image description here

> dotnet --version 
> 7.0.306

I can even build and run this application from the command line without a problem.

What is the issue with VS?


Solution

  • I think its just a general warning that you could probably ignore unless you want to use the .NET 6 Arm64 SDK. According to the link in the message:

    On Apple Silicon machines (also known as M1, M2, or ARM) with older x64 SDKs installed, you'll need to remove all existing .NET installations in order to use the .NET 6 GA Arm64 SDK.

    There is another link to script you can use to perform the until, or you can run:

    sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dotnet/sdk/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh)"
    sudo rm -r /etc/dotnet
    

    Basically, since you have .NET 7 installed, you can't use the .NET 6 SDK unless you remove .NET 7 first. But this warning is essentially a reminder to uninstall the .NET 6 SDK from your machine probably to avoid any weird issues (you probably want to use the latest SDK anyway).