Set location of binaries in wixproj file

痴心易碎 提交于 2019-12-25 02:56:08

问题


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.

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?

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


回答1:


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.

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).

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 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.



来源:https://stackoverflow.com/questions/30252746/set-location-of-binaries-in-wixproj-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!