Why does Tfs2010 build my Wix project before anything else?

 ̄綄美尐妖づ 提交于 2019-11-30 11:49:59

Its a bug, a bug, a bug. Dunno who is responsible, but here's a working dirty filthy hack:

  1. Open your .sln file in notepad.
  2. Find your wix projects in the list of projects.
  3. Cut them out, and paste them back after all other projects are listed.
  4. Cry in the shower as you try to scrub the dirty off, only to emerge hours later, rubbed raw and still with the stench of filth clinging to you like corpse's skin.

Following Rob Mensching's edit of my original post, it seems that this has indeed been fixed in WiX 3.6.0917.0 at the latest.

Mike

I was seeing this problem (wix 3.7 not finding the dependent project output) in my local and TFS builds (for both VS2010 and VS2012).

I finally got around it by setting the msbuild property /m:1 to only use a single build process. I set /m to allow msbuild to figure out how many processes it could use to simultaneously build with.

TFS uses a set of properties to control the names of the solutions and configurations to build ( iterate through ). For each combination of solution and configuration it then uses the project dependencies / build order to control the order of the projects getting built. It's possible that your EXE/DLL's are AnyCPU and that your WiX is x86 and that although the WiX has a dependency on the EXE/DLL the x86 is built before your AnyCPU. Or maybe they are even in different solutions so it's kind of hard to tell without looking at your source but that's basically how it works.

Frederic Forjan

What we did is to first report the bug to wix and then we found your question.

We solved the problem on our side by saying that, by default, the wix project will build the references. We updated the file C:\Program Files\MSBuild\Microsoft\WiX\v3.5\wix2010.targets by setting <BuildProjectReferences>True</BuildProjectReferences> in the project which set the path. So, yes, we have done this manually ; we have reported the bug as well as our fix.

I faced with a same problem today and find a solution like this:

Open your solution file on notepad the find your setup project and change postProject setting. This will tell msbuild this project should wait another project to build. I don't know why but it is not added by default.

Project("{GUID}") = "MyInstaller", "MyInstallerPath", "{Installer Project GUID}" ProjectSection(ProjectDependencies) = postProject {Prebuild Project GUID} = {Prebuild Project GUID} EndProjectSection EndProject

'Prebuild Project GUID' is the number on the right of the project that you want to install.

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