Skip to Content

WiX v4 Random Facts Nos. 1 and 2

WiX Toolset v4-preview.0 is available. For more information, see Rob’s blog post on the matter.

In WiX v3, Candle.exe is the WiX compiler that reads WiX authoring and writes .wixobj – WiX object – files. Light.exe is the WiX linker that combines .wixobj (and other) files into an MSI package (or a merge module or a bundle). Lit.exe combines multiple .wixobj files into a .wixlib (WiX library). If you’ve written C or C++ code (and compiled it by hand), you’ve seen this model in action.

WiX v4 works a bit differently. Although both v3 and v4 are written mostly in C#, WiX v4 takes its inspiration from the C# build tools more than C/C++:

  • WiX no longer writes .wixobj files. Instead, you build directly from source code to your preferred output format: MSI package, bundle, or WiX library.
  • The separate tools have been replaced by one: wix.exe. wix.exe has commands – the one that replaces Candle.exe, Light.exe, and Lit.exe is build. (Was this inspired by dotnet build? Maybe.)

Here’s how you might build an MSI package from two source files and a localization file:

wix build -o test.msi -bindpath data Package.wxs PackageComponents.wxs -loc Package.en-us.wxl

Here’s how you might build a WiX library with its files bound into it:

wix build -o test.wixlib -bindfiles -bindpath data PackageComponents.wxs