tfs - 针对框架4.7.2的TFS生成作业失败

标签 tfs msbuild visual-studio-2017 .net-framework-version

我在TFS 2013服务器上安装了框架4.7.2,并尝试使用msbuild构建作业。

我收到以下错误:

Task Parameter:TargetFrameworkMoniker=.NETFramework,Version=v4.7.2 (TaskId:6) C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1098,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. Output Property: _TargetFrameworkDirectories=



关于可以使FW 4.7.2与MsBuild配合使用的所有想法

最佳答案

尽管我们使用Azure Devops而不是TFS,但我们只是遇到了一个非常相似的问题(但我认为构建过程应该足够相似,至少就此而言)。

我通过在构建服务器上更新.NET Framework以及安装.NET Framework 4.7.2开发人员包来解决此问题,您可以从此处获取:
https://www.microsoft.com/net/download/visual-studio-sdks

不要忘记重启(就像我一样)。完成后,按照Leo的建议,尝试直接在生成服务器上的Visual Studio中打开项目,或者从命令行手动运行msbuild。

关于tfs - 针对框架4.7.2的TFS生成作业失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51826945/

相关文章:

c++ - Visual Studio 2017 Linux远程调试(gdbserver)

c# - 使用 dotnet core 1.1 和 xunit 单元测试显示输出?

visual-studio-2017 - 无法加载文件或程序集 System.Reflection.TypeExtensions

service - 命令行重新启动 Visual Studio Team Foundation Server 2012 生成服务?

c# - 在 Visual Studio Community 2015 RC 中编译 VSIX 项目时出现问题

msbuild - WIX 设置中的配置转换

c# - 生成警告 _GetPrimaryCpuAbi 目标 -> Xamarin.Android.Common.Debugging.targets(311,2) : warning : One or more errors occurred

tfs - Team Foundation Server 2008 的报告模板

tfs - TFS 2010 上的 Azure 最佳实践

powershell - 如何在 TFS Build 任务中获得代理用户能力?