简体   繁体   中英

Build x64 WIX project using Visual Studio 2010?

I can't get VS2010 to build a WIX project for x64 - meaning I can add the platform, but it doesn't build it.

Steps to reproduce:

  1. New Project > Windows Installer XML > Setup Project (Use default name, location, etc)
  2. Build > Configuration Manager > Active Solution Platform >
  3. New Platform: x64
  4. Copy settings from: x86
  5. Create new project platforms: Checked (I tried unchecked as well, no better)
  6. OK to close the New Solution Platform dialog
  7. Back in Configuration Manager, select x64 for the Platform
  8. Close the Configuration Manager
  9. Re-open the Configuration Manager

Results: Platform has reverted to x86.

Expected Results: Platform is still set to x64.

Am I missing something? I can't be the only person running into this?

WiX definitely supports x64! I got the same issue and that seems to be somehow a crazy issue as I also got it working for another solution for x86 and x64. So I compared the two solution files and figured out what was going wrong with the one not working.

GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {HERE-IS-STANDING-A-GUID}.Debug|x64.ActiveCfg = Release|x86
    {HERE-IS-STANDING-A-GUID}.Debug|x64.Build.0 = Release|x86
    {HERE-IS-STANDING-A-GUID}.Debug|x86.ActiveCfg = Debug|x86
    {HERE-IS-STANDING-A-GUID}.Debug|x86.Build.0 = Debug|x86
    {HERE-IS-STANDING-A-GUID}.Release|x64.ActiveCfg = Release|x86
    {HERE-IS-STANDING-A-GUID}.Release|x64.Build.0 = Release|x86
    {HERE-IS-STANDING-A-GUID}.Release|x86.ActiveCfg = Release|x86
    {HERE-IS-STANDING-A-GUID}.Release|x86.Build.0 = Release|x86
EndGlobalSection

This is a generated nonworking one. To make it work, I replaced the first four strings behind the "=" and played a bit with doing an x86 and x64 build. That worked for me.

Here is the same but working code:

GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {HERE-IS-STANDING-A-GUID}.Debug|x64.ActiveCfg = Debug|x64
    {HERE-IS-STANDING-A-GUID}.Debug|x64.Build.0 = Debug|x64
    {HERE-IS-STANDING-A-GUID}.Debug|x86.ActiveCfg = Debug|x86
    {HERE-IS-STANDING-A-GUID}.Debug|x86.Build.0 = Debug|x86
    {HERE-IS-STANDING-A-GUID}.Release|x64.ActiveCfg = Release|x64
    {HERE-IS-STANDING-A-GUID}.Release|x64.Build.0 = Release|x64
    {HERE-IS-STANDING-A-GUID}.Release|x86.ActiveCfg = Release|x86
    {HERE-IS-STANDING-A-GUID}.Release|x86.Build.0 = Release|x86
EndGlobalSection

Hope that works for you as well

I had the same problem just a few minutes ago in VS2010. I solved the problem by doing this:

  1. Close Visual Studio (maybe al instances)
  2. The x64 is suddenly gone for the wix projects....
  3. Create for the wix projects a new x64 without copy from other and uncheck the create solution configuration checkbox
  4. Save solution and close VS again.
  5. Open your project again
  6. Select the x64 again for the wix project. Now the x64 will stay...

Strange but it works :-)

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