MSBuild在通过TFS构建服务执行时找不到引用 [英] MSBuild cannot find reference when executed through TFS build service

查看:482
本文介绍了MSBuild在通过TFS构建服务执行时找不到引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个参考Telerik程序集的解决方案。引用的版本已在构建服务器上安装。问题是持续集成构建总是成功的,直到我升级了解决方案和我的构建服务器上的Telerik程序集。现在版本不符合古典:

I have a solution with reference to Telerik assemblies. The referenced version has been installed on the build server. The issue is that the continuous integration build always succeeded until I upgraded the Telerik assemblies in the solution and on my build server. The build now fails giving the classical:


无法解析此引用。

Could not resolve this reference.

我检查了我的解决方案,一切都设置为引用特定版本。最令人惊讶的是,如果我在构建服务器上本地打开解决方案,一切都将构建没有问题...所以这意味着Telerik程序集已经以某种方式发布,但是由于未知的原因,当调用MSBuild编译解决方案

I checked my solution and everything is set to reference the specific version. The most suprising is that if I open the solution locally on the build server, everything will build without a problem... so that means the Telerik assemblies have been published somehow, but for an unknown reason, when MSBuild is called to compile the solution throught the build service, it does not work.

推荐答案

在更新到Q3版本后,我有同样的问题。

I had the same problem after updating to the Q3 release.

为了解决这个问题,我建立了Logging Verbosity设置为Diagnostic的解决方案,发现MSBuild从不

To solve this, I built the solution with Logging Verbosity set to Diagnostic, and found that MSBuild never bothered to look in the Telerik folder.

因此,要在构建中包含该文件夹,我们只需添加一个MSBuild参数:
/ p:ReferencePath =C:\Program Files\Telerik\RadControls for WPF Q3 2012\Binaries\WPF40

So to include that folder in the build, we simply added it by adding a MSBuild argument: /p:ReferencePath="C:\Program Files\Telerik\RadControls for WPF Q3 2012\Binaries\WPF40"

这可能不是最好的,需要

It's perhaps not the best, and needs to be updated everytime you update RadControls, but it works.

我们在x86安装上运行构建服务器,因此Telerik位于C:\Program文件下,但如果您运行在x64上,它在C:\Program Files(x86)下,所以如果你在x64和x86安装上运行几个构建服务器,你必须同时指定路径。

We run the build server on a x86 installation, so Telerik is located under C:\Program Files, but if you run on a x64, it's under C:\Program Files(x86), so if you run several build servers on both x64 and x86 installations, you must specify both path.

这篇关于MSBuild在通过TFS构建服务执行时找不到引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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