在 wixproj 文件中设置二进制文件的位置 [英] Set location of binaries in wixproj file

查看:29
本文介绍了在 wixproj 文件中设置二进制文件的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Wix 3.9,当我在 TFS 中运行持续集成构建时出现错误heat.exe:找不到目录 因为 TFS 将二进制文件放在与我本地机器不同的位置,所以项目将在本地构建,但不在 TFS 上构建.

I am using Wix 3.9 and when I run a continuous integration build in TFS I get an error heat.exe: The directory could not be found because TFS is putting binaries in a different location to my local machine, so the project will build locally but not on TFS.

在我的 wixproj 文件中,我为本地工作的二进制文件设置了一个位置Dir=$(SolutionDir)\ProjectName\bin\$(Configuration).有什么我可以设置的,它可以在我的本地机器和 TFS 上找到二进制文件?

In my wixproj file I have a location set for the binaries which works locally Dir=$(SolutionDir)\ProjectName\bin\$(Configuration). Is there anything I can set this to which will find the binaries both on my local machine and TFS?

我正在寻找类似于项目引用变量 $(var.MyProject.TargetDir) 的东西,但这在 wixproj 文件中似乎不起作用.

I am looking for something like the project reference variable $(var.MyProject.TargetDir), but this doesn't seem to work in wixproj files.

推荐答案

我通过更改项目文件将二进制文件输出到与 Team Foundation Build 相同的位置来解决此问题.这样桌面和持续集成构建都可以使用对公共二进制文件目录的相同引用.

I worked around this issue by changing my project files to output the binaries to the same location as Team Foundation Build. That way both desktop and continuous integration builds can use the same reference to the common binaries directory.

如果您使用的是 Team Foundation Build 2012 或更早版本,您的目录引用将是:Dir=$(SolutionDir)..\Binaries\$Configuration.C# 项目中对应的输出路径为 ..\..\Binaries\Release..\..\Binaries\Debug(假设项目文件夹位于在源目录的根目录中).

If you are using Team Foundation Build 2012 or earlier your directory reference would be: Dir=$(SolutionDir)..\Binaries\$Configuration. The corresponding output path in a C# project would be ..\..\Binaries\Release or ..\..\Binaries\Debug (assuming the project folder is located in the root of the sources directory).

如果您使用的是 Team Foundation Build 2013,可以使用相同的技术,但 Binaries 文件夹变为 bin.您的目录引用变为:Dir=$(SolutionDir)..\bin\$Configuration.项目输出文件夹也需要进行类似的更改.

If you are using Team Foundation Build 2013, the same technique can be used, but the Binaries folder becomes bin. Your directory reference becomes: Dir=$(SolutionDir)..\bin\$Configuration. A similar change is required to the project output folders.

Team Foundation Build 2013 有额外的选项来控制输出位置,您可以将输出二进制文件放置在与项目结构相同的布局中.我个人没有使用过,但这可能会提供解决方案.

Team Foundation Build 2013 has additional options to control the output location, where you can put the output binaries in the same layout as your project structure. I've not used that personally but that might provide a solution.

这篇关于在 wixproj 文件中设置二进制文件的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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