Build WiX 3.6 project targeting x64?

后端 未结 1 386
长情又很酷
长情又很酷 2021-01-31 04:32

My solution is built with platform setting \"Any CPU\". For my WiX 3.6 installer project settings, it seems that I can\'t set the target platform to \"x64\"; only \"x86\" is ava

1条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 04:48

    Windows installers cannot be built to target Any CPU, I typically build twice, with the managed code being set to Any CPU, whilst the installer has two configurations x86 and x64.

    You may find you need to create the configurations, this can be done by right clicking on the solution and selecting configuration manager then selecting the drop down under platform. When you're complete you should be able to see the following defined in your wixproj:

      
        bin\$(Configuration)\
        obj\$(Configuration)\
        Debug
      
      
        bin\$(Configuration)\
        obj\$(Configuration)\
      
      
        Debug
        bin\$(Platform)\$(Configuration)\
        obj\$(Platform)\$(Configuration)\
      
      
        bin\$(Platform)\$(Configuration)\
        obj\$(Platform)\$(Configuration)\
      
    

    To allow the installer to work with both x86 and x64 define variables to detect and set the architecture of the install.

    
    
    
    
    
    
    
    
    
    

    I append the bitness variable to the name as a visual clue:

    Refer to the Program Files Folder as appropriate:

      
        
          
    

    Components have the Win64 flag set appropriately:

    0 讨论(0)
提交回复
热议问题