我正在开发macOS Big和Visual .net核心5。我认为这些问题是在允许Visual安装更新(我没想到会出现任何问题)之后,在
dotnet
命令停止工作几个小时后开始的。
我发现这是M1 Mac上的一个已知问题,当dotnet停止工作时,推荐的版本可以使用- 5.0.402。我设置了dotnet并安装了推荐的版本。
卸载dotnet的命令(需要脚本文件):
chmod +x dotnet-uninstall-pkgs.sh
sudo ./dotnet-uninstall-pkgs.sh
sudo rm -r /etc/dotnet
安装更新版本(5.0.402)之后,我的项目仍然无法工作,我在Visual中得到了这个错误:
/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.
我正在考虑卸载最新的SDK,但不确定这是否是一个好主意,并可能导致VisualStudio的其他问题。
$ ./dotnet-core-uninstall list
输出(来自dotnet-核心卸载工具):
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: