This is part of a series of posts about breaking changes in WiX Toolset v4.0.

As Bob mentioned in his WiX v4 Random Fact No. 4 post, Burn is now available in three different flavors: x86, x64, and ARM64. I’m going to spend a few posts going over the breaking changes we implemented for this support. First up - the new way to reference the built-in BootstrapperApplications (BAs) from the Bal extension.

In v3, the simplest way to build a bundle was to reference the standard WiX BA (wixstdba) from the Bal extension. Here’s how to do it in v4:

<!-- v3.x -->
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" />

<!-- v4.0-preview.0 -->
<BootstrapperApplication>
  <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" />
</BootstrapperApplication>

This was necessary because the architecture of the BA .dll must match the architecture of the Burn stub .exe. Just like any other Windows application, the bundle can only load .dlls that are the same architecture as itself. Under the hood, the value of the --arch switch is used by the Bal extension to bring in the correct architecture of wixstdba. It’s worth noting that the Bal extension compiler is doing extra work on top of that, so it’s not possible in v4 to directly reference the BootstrapperApplication definition of any of the Bal BAs.

Action Required

This post will turn out to be unusual in this series because there is an automated way to fix this: run wix convert on your v3 code to get WiX to automatically convert it into v4. Checkout Rob’s post about details on wix convert and how to get v4-preview.0. If you run into any problems, please bring them up at our GitHub discussions.