Reputation: 1443
I created a Wix setup project for my .Net app (using Wix 3.11.1) with files, shortcuts, custom UI, custom action and all.
The solution itself contains a large number of .csproj-s, the Wix setup project and a Wix Custom Action project.
When I build it from Visual Studio (2010, heading towards 2017), the build seems to be correct, I get "Build succeeded".
However, my automated build script (which cleans the solution and then runs MsBuild against the solution) fails, because the Wix Setup project is built before the Custom Action project.
The custom build script is simple:
MsBuild.exe .\<solutionname>.sln /target:Rebuild /property:Configuration=<config> /property:Platform=<platform>
I tried adding a reference to the Wix setup project pointing to the CA project, hoping that the reference would tell MsBuild to build the CA project first, and then build the setup project. It didn't work.
If I run the same build script again (now the CA project having been built) the scripted build succeeds.
Can I somehow tell MsBuild to build the projects in the correct order?
I'm currently using MsBuild from .Net FW 4.0 (%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe)
Any ideas?
Upvotes: 2
Views: 734
Reputation: 1443
A solution exists here (see the highest voted comment saying "It's a bug, bug, bug...". Why does Tfs2010 build my Wix project before anything else?
In short: you need to re-order your projects in the solution file using a text editor.
Upvotes: 2