Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 995
Marcel Lamothe Avatar asked Nov 23 '10 21:11

Marcel Lamothe


People also ask

How do I run a WiX project in Visual Studio?

In Visual Studio, open your solution, and add a WiX project to it: go to the Visual Studio main menu and click File -> Add -> New Project to open the Add New Project dialog. Choose the Setup Project item in the Windows Installer XML node, specify the project name and click OK.

What is WiX Visual Studio?

The Visual Studio WiX toolset allows you to easily create WiX projects, edit WiX files using IntelliSense, and compile/link your project within the Visual Studio IDE. For WiX project types, see WiX Project Types. For WiX item templates, see WiX Item templates.

How do I debug a WiX project in Visual Studio?

That way when running the MSI, a popup will be presented asking if you want to “Debug the program”. Click on this option and then choose the Visual Studio instance on which the custom action project is open on. The execution will stop at the break call (if not press F10) and you can start debugging.

How do I create a WiX Installer?

Step 2: Create the installer for the applicationName your project "MySetup" and press OK. In the MySetup project, right-click on the References node and choose Add Reference.... Navigate to the Projects tab, click on the MyApplication project, and click the Add button, and then press OK. Build the WiX project.


1 Answers

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

like image 197
user432758 Avatar answered Sep 20 '22 06:09

user432758