9
votes

I have a VS2012 Solution with 3 build configurations:

  • Debug
  • Release
  • "Mine"

In the Configuration Manager, I have some .NET projects with options based on the Mine configuration. All ok.

I have a WiX installer project which in the Configuration Manager, appears to only support Release and Debug as options - I cannot add Mine as an option there.

As a consequence, when I build my WiX project, while each dependent C# project uses the Mine configuration, the WiX project uses Release.

Generally this would not be a problem, however I have a BeforeBuild action which is using $(Configuration). And this is pulling in Release instead of my desired and selected "Mine".

Any ideas how I can pass or reference Mine from MSBuild from a project that does not include it? Is there another $(ActiveConfiguration) or similar?

Thanks

1

1 Answers

12
votes

I do believe it's a bug in WiX. If you edit your wxproj file, you should see that there is no record for "Mine". To fix such issues, you need to edit wixproj file manually and copy the relevant section for "Release" mode and dupliate it and change it to "Mine".

Some links: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Adding-deleting-project-configurations-td7582655.html

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Changing-configuration-and-or-platform-in-solution-Configuration-Manger-does-nothing-td7588992.html