It seems we have this question pop up a few times a week on the wix-users mailing list, so I thought I'd add something here as another reference when people are searching the web. Thanks to Aaron Stebner for writing this entry in our WiX.chm file, available as part of the WiX releases (>= 3.0.3419).

How to use WiX 3.0 extensions when building MSIs

To use a WiX 3.0 extension when calling the WiX tools directly, you need to use the -ext command line parameter available in the Candle, Light and Lit tools and pass in the extension DLL(s) needed for your project. Each extension DLL must be passed in via separate -ext parameters. For example:

light.exe MySetup.wixobj
-ext "C:\Program Files\Windows Installer XML v3\bin\WixUIExtension.dll"
-ext "C:\Program Files\Windows Installer XML v3\bin\WixUtilExtension.dll"
-out MySetup.msi

To use a WiX 3.0 extension when building in Visual Studio with the Votive add-in, you can use the following steps:

  1. Right-click on the WiX project in the Visual Studio solution explorer and select Add Reference...
  2. In the Add WiX Library Reference dialog, click on the Browse tab and browse to the WiX extension DLL that you want to include.
  3. Click the Add button to add a reference to the chosen extension DLL.
  4. Browse and add other extension DLLs as needed.

After you have added a reference to an extension DLL, Votive will automatically add the appropriate -ext command line switches when it calls Candle, Light or Lit when performing a build.

How to enable IntelliSense for WiX 3.0 extensions

To enable IntelliSense for a WiX extension in the Visual Studio IDE, you must also add an XMLNS declaration to the <WIX> element in your WXS file. For example, if you want to use the NativeImage functionality in the WixNetFxExtension, the element would look like the following:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> 

After adding this, you can add an element named <netfx:NativeImage/> and view IntelliSense for the attributes supported by the NativeImage element.