I'm working on macOS Big Sur and Visual Studio .net core 5.
I think the issues started after allowing Visual Studio to install updates (I wasn't expecting any issues), after a few hours dotnet
command stopped working.
I found out that it's a known issue on M1 Macs, when dotnet stops working and that the recommended version to work with - 5.0.402. I unistalled dotnet and installed the recommended version.
Commands to uninstall dotnet (require script file):
chmod +x dotnet-uninstall-pkgs.sh
sudo ./dotnet-uninstall-pkgs.sh
sudo rm -r /etc/dotnet
After installing the newer version(5.0.402) my project still doesn't works and I'm getting this error in Visual Studio:
/usr/local/share/dotnet/x64/sdk/6.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4236: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found.
I was thinking to uninstall the latest SDK but not sure if it's a good idea and may cause to additional issues with VisualStudio.
$ ./dotnet-core-uninstall list
Output (from dotnet-core-uninstall tool):
This tool cannot uninstall versions of the runtime or SDK that are installed using zip/scripts. The versions that can be uninstalled with this tool are:
.NET Core SDKs:
5.0.402 (x64) [Used by Visual Studio for Mac. Specify individually or use —-force to remove]
.NET Core Runtimes:
5.0.11 (x64) [Used by Visual Studio for Mac or SDKs. Specify individually or use —-force to remove]
Please advise how to solve this issue.
Thanks in advance!