Set location of binaries in wixproj file

2019-09-02 02:23发布

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.

标签: wix
1条回答
Ridiculous、
2楼-- · 2019-09-02 03:02

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.

查看更多
登录 后发表回答