c# - Microsoft.CSharp.Core.targets 缺失

标签 c# tfs msbuild nuget visual-studio-2017-build-tools

我正在使用构建工具 2017 在 TFS2017 Update 3 上构建 Web 服务项目。我收到以下错误

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(322,5): Error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

我需要采取哪些步骤来修复此错误?

最佳答案

就我而言,打开现有的解决方案文件(扩展名为.sln),它安装了所有缺少的依赖项。

否则检查 nuget.org 是否缺少目标包手动安装它们(例如 MSBuild.Microsoft.VisualStudio.Web.targets )。

关于c# - Microsoft.CSharp.Core.targets 缺失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47260114/

相关文章:

c# - C# 中的位图字节操作

c# - 执行 "Console.ReadKey"时允许重定向 C# 应用程序的 StandardInput

c# - TFS : Marking Files for Deletion 的 Visual Studio 加载项

TFS 燃尽图

visual-studio-2010 - TFS:查看所有未版本控制的文件

c# - 如何使用 Git 在 Azure 上部署 C#、MVC4 应用程序

visual-studio-2013 - 如何从发布中排除 .less 文件?

MSBuild,覆盖命令行上的属性表

tfs - 生成 MSI 作为 TFS 构建的一部分

c# - 如何使用 MySqlDataReader 返回多个表?