dotnet还原失败,并显示错误MSB4062:无法加载“ CheckForImplicitPackageReferenceOverrides”任务

时间:2019-11-28 09:13:19

标签: .net-core

我最近安装了Alpha预览版.NET Core,并将MSBuildSdksPath设置为指向它。在那个dotnet发布甚至是dotnet恢复失败之后,所以我删除了环境变量,但是现在它失败了:

error MSB4062: The "CheckForImplicitPackageReferenceOverrides" task could not be loaded from the assembly C:\Program Files\dotnet\sdk\2.2.103\Sdks\Microsoft.NET.Sdk\targets\..\tools\netcoreapp2.0/Microsoft.NET.Build.Tasks.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [c:\Workspace\Telesis\Configuration.Repositories\Configuration.Repositories.csproj]

1 个答案:

答案 0 :(得分:0)

https://github.com/dotnet/cli/issues/9759中,我发现了这一点:

  

如果遇到错误且未设置MSBuildSdksPath,则可以尝试dotnet build-server shutdown

我跑了dotnet build-server shutdown,然后dotnet restore工作了。