1

I have a project that includes a windows installed XML project that builds an MSI. This source works fine in 32 bit platform computers where you can build the solution easily. But when trying to build the source in 64 bit platform computers an error occurs in WIX project. Following is the error.

enter image description here

What makes WIX project throw this error ? Do WIX support 64 bit MSI creation ? ( I'm using Visual Studio 2012 )

Nilaksha Perera
  • 715
  • 2
  • 12
  • 36

1 Answers1

4

WiX supports creating a 64 bit MSI, however you have to alter the csproj file for WiX if you are using the WiX projects created by the WiX toolset. Where normal projects would let you open properties and set the Platform, the WiX projects do not, through the GUI anyways.

Below will allow the project to compile in x64 (I don't support x86, so I don't setup both).

<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>

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

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
Kaiser12
  • 631
  • 4
  • 4
  • 1
    The thing is even worse, the VS GUI allows you build against x64 and gives you the illusion everything is ok, but the target platform remains x86! An msi targetted for x86 will redirect all registry entries of HKLM/Software/Classes/ClsID to WOW6432, I got mad about that. I can't understand that in 2020 Wix still takes x86 as the only default target platform and the VS GUI stubbornly refuses to accept x64 as target platform. Anyway, thank you and one well deserved upvote from me. – Dietrich Baumgarten May 15 '20 at 08:18