mac VS提示 SDK package not found "Microsoft.NET.SDK 解决方法

依据:https://developercommunity.visualstudio.com/t/monodevelopcoreuserexception-unable-to-find-sdk-mi/1459162#T-N1460014

This is a problem with the .NET 6 preview 5 - https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md#preview-5

The workload manifest files were renamed in .NET 6 preview 5 which results in duplicate ids and causes the workload resolver to fail. This then results in Visual Studio for Mac showing an error about the WorkloadAutoImportPropsLocator sdk not being found.

A workaround is to remove the sdk-manifests directory /usr/local/share/dotnet/sdk-manifests/6.0.100 and then install the .NET 6 preview sdk again so it adds back the manifest files it needs.

变通的方法

删除/usr/local/share/dotnet/sdk-manifests/目录下所有文件,重新安装dotnet 6 SDK,解决问题

原文地址:https://www.cnblogs.com/quejuwen/p/15784016.html