我正在使用Rosilyn阅读解决方案,我收到以下错误:

使用以下消息处理文件'C:\ tfs \ DemoSolution \ UI \ UI.csproj'时Msbuild失败:C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ MSBuild \ 15.0 \ Bin \ Microsoft.Common .CurrentVersion.targets:(1656,5):无法从程序集“C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE \ CommonExtensions \ Microsoft \ NuGet”实例化“GetReferenceNearestTargetFrameworkTask”任务\ NuGet.Build.Tasks.dll” . 请验证是否使用与计算机上安装的Microsoft.Build.Framework程序集相同的Microsoft.Build.Framework程序集版本构建了任务程序集,并确保主机应用程序没有缺少Microsoft.Build.Framework的绑定重定向 . 无法将“NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask”类型的对象强制转换为“Microsoft.Build.Framework.ITask” . C:\ Program Files(x86)\ Microsoft Visual Studio \ 2017 \ Enterprise \ MSBuild \ 15.0 \ Bin \ Microsoft.Common.CurrentVersion.targets:(1656,5):“GetReferenceNearestTargetFrameworkTask”任务已被声明或使用不正确,或者施工期间失败 . 检查任务名称和程序集名称的拼写 .

我发现以下问题描述了同样的问题,但没有帮助 . Project MetadataReferences is not populated when ProjectReferences are present

知道我还能尝试什么吗?