Light Task

Windows Installer XML (WiX) v3.0

Light Task

The Light task wraps light.exe, the WiX linker. It supports a variety of settings that are described in more detail below. The following is a sample shows a the NAnt code used to run the Light task:

<light
  exedir="${wix.dir}"
  out="${output.dir}\Setup.msi"
  warningsaserrors="true"
  suppressices="ICE57"
  cultures="en-us"
  extensions="WixUIExtension"
  rebuild="true"
  suppresspdb="true">
  <!-- Specify additional options -->
  <arg line="-fv" />
  <sources basedir="${release.dir}\Setup\obj">
    <include name="*.wixobj" />
  </sources>
</light>

The following table describes the common WiX NAnt parameters that are applicable to the Light task.

Parameter Description
exedir Optional string parameter.

Sets the directory to the tool executable. Defaults to the path specified by the registry key "HKLM\SOFTWARE\Microsoft\Windows Installer XML\3.0\InstallRoot" which is set by the WiX installation.
If no path is found or specified the task assumes the executable is on the path.
out Required string parameter.

Sets the file or directory to write the output to. This is equivalent to the -out switch.
extensions Optional string parameter.

Semi-colon separated list of WiX extensions to load. This is equivalent to the -ext switch.
rebuild Optional boolean parameter.

Instructs NAnt to recompile the output file regardless of the file timestamps..
sources Required NAnt fileset.

The set of source files for compilation. This is equivalent to the -xx switch.
warningsaserrors Optional boolean parameter.

Specifies that certain warnings should be treated as errors. This is equivalent to the -wx switch.
verbose Optional boolean parameter.

Specifies that the tool should provide verbose output. This is equivalent to the -v switch.

The following table describes the parameters that are specific to the Light task.

Parameter Description
cultures Optional string parameter.

Specifies a semicolon-delimited list of localized string cultures that the linker should load from libraries. This is equivalent to the -cultures switch in light.exe.
localizations Optional NAnt fileset.

The set of localization files (.wxl) to include. This is equivalent to the -loc switch in light.exe.
suppressices Optional string parameter.

Specifies a semicolon-delimited list of ICE validations that the linker should suppress running. This is equivalent to the -sice:<ICE> switch in light.exe.
suppresspdb Optional boolean parameter.

Specifies that the linker should suppress outputting .wixpdb files. This is equivalent to the -spdb switch in light.exe.
reusecab Optional boolean parameter.

Specifies that the linker should reuse cabinet files from the cabinet cache. This is equivalent to the -reusecab switch in light.exe.
cabcache Optional string parameter.

Specifies a path that the linker should use to cache built cabinet files. This is equivalent to the -cc switch in light.exe.
fileversions Optional boolean parameter.

Specifies that the linker should add a 'fileVersion' entry to the MsiAssemblyName table. This is equivalent to the -fv switch in light.exe.

Additional options can be added by using the standard NAnt <arg> elements, e.g.:

<arg line="-sacl" />