5
votes

enter image description here

IDE:- VS.NET 2013 (Update 2)

WIX version used : 3.9

Windows service MSI :- I am unable to change the platform to x64 bit and save it. If i change it to x64 option and save the build properties and close the property window, then reopen the property window again. The x86 option pops up again.. Although, the DLL's used in the project are coming as 64 bit based.

It is very annoying and frustrating. After i hit the Build on the ServiceSetup project, the .MSI file get generated. The MSI contains the windows service .exe file which unfortunately is 32 bit based. I want the windows service .exe file to be 64 bit.

Please suggest any soln.

3
I'm not sure what the project issue is about, but if you want the service to be 64-bit then you need to mark its component as Win64. A 64-bit MSI can contain 32 and 64-bit components.PhilDW
I tried that by marking the component as Win64. But no luck in getting the 64bit version. I am not interested in 32 bit version. So i tried if i can yield the 64 bit from the project setup build.Karan

3 Answers

2
votes

I had this same issue. It was very frustrating. Somehow I got around it by:

  1. Open configuration Manager
  2. Create a new "x64" solution platform, without copying settings from the x86 and "Create new solution platforms" checked.
    1. Ensure in this configuration manager window, the Active solution platform and the platform dropdown for the project are both x64 .. If needed, delete the x86 options from the configuration manager
    2. Go to the Project Properties> Build tab
    3. Ensure the platform dropbox says Active(x64), if not, select it.
    4. Re-open the Build tab and check it still has the Active(x64). Sometimes the build active platform would switch to x86 when I put it as x64, but you first need to ensure step 3 is set.
0
votes

Justin's solution didn't work for me. Although I could create the x64 platform, x86 stubbornly came back as the only option. My solution is as follows:

(1) Create a new Setup Project for WiX v3.

(2) Close the solution and open the .wixproj file in an extern editor like notepad+.

(3) The file contains only PropertyGroup elements for x86. After that insert the following PropertyGroup elements:

<!-- Insert -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
  <DefineConstants>Debug</DefineConstants>
  <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
  <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
  <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
  <IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>

(4) Reopen the project. Select Configuration Manager.

enter image description here

Under Project contexts, you can now select x64 in the drop down list. Do it.

(5) The drop down list of Active solution platform still only has x86. Select “New…” In the “New Solution Platform” dialog create the x64 platform.

(6) In the final step synchronize the settings of the solution platform with the project platform so that the four configuration | platform pairs are the same.

Source for step 3: WIX project fails building in X64 platform.