针对框架4.7.2的TFS生成作业失败 [英] TFS build job failed for Framework 4.7.2

查看:88
本文介绍了针对框架4.7.2的TFS生成作业失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have installed framework 4.7.2 on TFS 2013 server and trying to build a job using msbuild.

我遇到以下错误:

任务参数:TargetFrameworkMoniker = .NETFramework,Version = v4.7.2 (TaskId:6)C:\ Program文件 (x86)\ MSBuild \ 14.0 \ bin \ Microsoft.Common.CurrentVersion.targets(1098,5): 错误MSB3644:框架的参考程序集 找不到".NETFramework,Version = v4.7.2".为了解决这个问题, 为此框架版本安装SDK或Targeting Pack或 将您的应用程序重新定位到您所针对的框架版本 安装了SDK或Targeting Pack.请注意,程序集将 从全局程序集缓存(GAC)中解析,并将用于 参考装配体的位置.因此,您的程序集可能不会 正确定位您想要的框架.输出属性: _TargetFrameworkDirectories =

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一起使用的任何想法

Any ideas on what I can check to make the FW 4.7.2 to work with MsBuild

推荐答案

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

We just had a very similar issue, although we use Azure Devops rather than TFS (but I think the build process should be similar enough, at least regarding this).

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

I resolved it by updating .NET framework on the build server as well as installing the .NET Framework 4.7.2 developer pack, which you can get from here: https://www.microsoft.com/net/download/visual-studio-sdks

别忘了重启(就像我一样).完成后,正如Leo建议的那样,请尝试直接在构建服务器上的Visual Studio中打开项目,或从命令行手动运行msbuild.

Don't forget to reboot (like I did). Once that's done, as Leo suggested try opening the project in Visual Studio directly on your build server or manually running msbuild from the command line.

这篇关于针对框架4.7.2的TFS生成作业失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆