找不到参考系统

Mas*_*son 7 c# reference system visual-studio visual-studio-2017

所以我使用Visual Studio 2017,一切正常.但后来我更新到15.6.0,突然间什么都没有了.

所有引用如Systme.*或Microsoft.*都带有黄色警告标志......

在每个项目 - 甚至是新项目 - 我(重新)建设之后我都会得到相同类型的错误:

The "ResolveAssemblyReference" task could not be initialized with its input parameters

The "ResolveAssemblyReference" task could not be initialized with its input parameters      

The "FindDependenciesOfExternallyResolvedReferences" parameter is not supported by the "ResolveAssemblyReference" task. Verify the parameter exists on the task, and it is a settable public instance property          

This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them
Run Code Online (Sandbox Code Playgroud)

我已经尝试重新安装Visual Studio 2017,重新安装.NET Framework,但我仍然每个 C#项目上遇到这些类型的错误......

在完全重新安装Windows之后是否有任何解决方案?

Mas*_*son 7

社区编辑(尼克的评论如下 - 一个重要警告):

使用部分MSBuild 15.5覆盖部分MSBuild 15.6是危险的,完全不受支持.各种其他事情都可能破裂.


终于修好了!

通过更新到15.6.0,此文件以某种方式损坏:

C:\Program Files (x86)\Microsoft Visual Studio\2017\EnterpriseWMSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets

要么

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets

将该文件替换为以前的版本,并修复了所有错误!

从尚未更新其Visual Studio的同事那里获取以前的版本.

  • 非常感谢,它的确有效!我也拉着我的头发.微软真的需要将他们的产品放在一起,并在每次发布时停止破坏...... (4认同)
  • 人们从哪里得到这个"之前版本的一个"? (2认同)
  • 您可以在这里找到15.5版本:https://raw.githubusercontent.com/Microsoft/msbuild/vs15.5/src/Tasks/Microsoft.Common.CurrentVersion.targets (2认同)