1

Environment:
Visual Studio 2019 WPF .Net Framework 4.8
Wix Toolset - latest version
Link to article

I'm trying to mark my components to be 64-bit and according to article below there are 2 "easy ways".

  1. Use -arch on command line. I'm using Visual Studio that automatically runs candle.exe. Is there a way to add through Visual Studio?
  2. Use InstallerPlatform property in .wixproj. I unload the .wixproj and then edit it but I have no idea where and how to specify this property.

enter image description here

Rod
  • 14,529
  • 31
  • 118
  • 230
  • It is not very neat, but unloading the WiX project `(Right click Wix project => "Unload Project")` and then right clicking the project (which now says "unavailable") and `"Edit [ProjetName].wixproj"` will give you the wixproj file raw (you can also edit it with a text editor by opening it). Now inject `"x64"` into the debug and release configurations and see what this does. – Stein Åsmul Sep 25 '20 at 11:24
  • Alternatively you can use the -arch switch to compile using candle.exe and light.exe manually:"%WIX%bin\candle.exe" product.wxs -arch x64 -ext WixUIExtension >> Build.log "%WIX%bin\light.exe" -out Test.msi product.wixobj -ext WixUIExtension >> Build.log – Stein Åsmul Sep 25 '20 at 11:32

1 Answers1

2

There must be something better than this (perhaps Chris Painter shows up - he is the apex build automation guy), but here goes with some pragmatic tweaks:

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

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

I am not sure if Votive (WiX component in Visual Studio) will preserve this value or if it might get removed as you work.

Hence using candle.exe and light.exe manually could be safer - I am not sure. I don't have this particular use-case right now:

"%WIX%bin\candle.exe" product.wxs -arch x64 -ext WixUIExtension >> Build.log 
"%WIX%bin\light.exe" -out Test.msi product.wixobj -ext WixUIExtension >> Build.log
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164