TeamCity 中的 MSBuild 12 未找到 .NET 4.5.1 的参考程序集 [英] MSBuild 12 in TeamCity not finding reference assemblies for .NET 4.5.1

查看:19
本文介绍了TeamCity 中的 MSBuild 12 未找到 .NET 4.5.1 的参考程序集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 TeamCity 构建日志中收到以下警告消息:

<块引用>

[GetReferenceAssemblyPaths] C:Program Files (x86)MSBuild12.0inMicrosoft.Common.CurrentVersion.targets(989, 5):警告 MSB3644:框架.NETFramework,Version=v4"的参考程序集.5.1" 未找到.要解决此问题,请为此框架版本安装 SDK 或 Targeting Pack,或者将您的应用程序重新定位到安装了 SDK 或 Targeting Pack 的框架版本.请注意,程序集将从全局程序集缓存 (GAC) 中解析,并将用于代替引用程序集.因此,您的程序集可能没有正确针对您想要的框架.

我正在使用 MSBuild Runner 类型.我为 MSBuild 版本选择了 Microsoft Build Tools 2013,为 MSBuild ToolsVersion 选择了 12.0.我的解决方案中的所有项目都针对 4.5.1.我的解决方案是在VS2013中.

我在 TeamCity 服务器上安装了 MSBuild Tools 2013(重新启动了 TeamCity 服务)和所有构建代理(也重新启动了这些服务).

这是我需要担心的事情吗?如果是,我该如何纠正?

解决方案

我安装了 .NET Framework 4.5.1 SDK,现在似乎可以正常工作了.

更新:

现在称为适用于 Windows 8.1 的 Windows 软件开发工具包 (SDK).>

启动安装程序后,您将进入选择要安装的功能屏幕,您可以在其中取消选中除.NET Framework 4.5.1 SDK之外的所有内容和您只需要大约 70-80 MB 的磁盘空间,而不是整个 SDK 将使用的 1.5 GB.

I'm getting the following warning messages in my TeamCity build log:

[GetReferenceAssemblyPaths] C:Program Files (x86)MSBuild12.0inMicrosoft.Common.CurrentVersion.targets(989, 5): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5.1" 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.

I'm using the MSBuild Runner Type. I have Microsoft Build Tools 2013 selected for the MSBuild Version and 12.0 selected for MSBuild ToolsVersion. All of my projects in my solution are targeting 4.5.1. My solution is in VS2013.

I installed the MSBuild Tools 2013 on the TeamCity server (restarted the TeamCity service) and all build agents (restarted those services also).

Is this something I need to worry about, and if so how can I get it corrected?

解决方案

I installed the .NET Framework 4.5.1 SDK and it seems to be working properly now.

Update:

It's called Windows Software Development Kit (SDK) for Windows 8.1 by now.

After starting the installer you'll get to the Select the features you want to install screen where you can untick everything except the .NET Framework 4.5.1 SDK and you'll need only some 70-80 MB of disk space, not the 1.5 GB that the whole SDK would use.

这篇关于TeamCity 中的 MSBuild 12 未找到 .NET 4.5.1 的参考程序集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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