WiX x64 platform target

64-bitbuildwixwix3.5

When I create a WiX project and try to build it with the platform set to 'x64', I get errors in my build output like this:

------ Build started: Project: MyProject, Configuration: Release x64 ------
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(444,7): error : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Release'  Platform='x64'
Done building project "MyProject.wixproj" -- FAILED.
------ Build started: Project: MyProject, Configuration: Debug x64 ------
C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets(444,7): error : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Debug'  Platform='x64'
Done building project "MyProject.wixproj" -- FAILED.

It claims that there's no output path set for the project, but of course, there is. The output path is set to bin\x64\Debug\ for the debug configuration and bin\x64\Release\ for the release configuration. So what's the error?

Also, the error doesn't show up in the Errors window. Now, I know it's a rookie mistake to blame the compiler, but I'm beginning to wonder… Is this a build tool bug, or am I missing something stupid?

Best Answer

If you open your .wixproj file in a text editor, you will see that your x64 configuration items are at the bottom of the file (below the import of the standard WiX build targets) and your x86 configuration is at the top (above the import). If you shift the XML for the x64 config so that it's adjacent to the x86 config, then you will find that your project builds properly for both platforms.