简体   繁体   中英

WiX x64 platform target

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?

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.

I had the same issue. In my case, however, the wixproj file was not malformed, but the

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">

was missing completely. Just made a copy of the x86 config, saved and all is good.

First make sure you are using the latest version of the WiX toolset (v3.5 or current v3.6 drop). If this still reproduces there it sounds like a bug. Please do file it here:http://sourceforge.net/tracker/?group_id=105970&atid=642714

Warning: WiX can insert multiple instances of this in different <PropertyGroup>s:

    <DefineConstants>Foo=Bar</DefineConstants>
    <DefineConstants>Foo=</DefineConstants>

thus overriding the settings that you want. You need to carefully edit the .WIXPROJ file manually and look out for duplicates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM