I have installed Visual Studio 2022 for Mac [v17.5.4 (build 8)]. And also install .net 6 and .net 7 but the SDK location was not found.
First I install VS2022 for mac then it is not working then I tried this tutorial here
but my installation location is different, folder location: /opt/homebrew/Cellar/dotnet/7.0.100/bin/dotnet
dotnet --list-sdks
7.0.100 [/opt/homebrew/Cellar/dotnet/7.0.100/libexec/sdk]
How I can solve this problem?
The default path for Visual Studio 2022 on Mac is causing the issue. VS 2022 can't locate the SDK. As stuartd suggested in the comment dotnet --list-sdks
, so by replacing the default path with the list-sdks
path solves the issue.