Skip to main content
Version: v3

Light Task

The Light task wraps light.exe, the WiX linker. It supports a variety of settings that are described in more detail below. To control these settings in your .wixproj file, you can create a PropertyGroup and specify the settings that you want to use for your build process. The following is a sample PropertyGroup that contains settings that will be used by the Light task:

<PropertyGroup>
<LinkerTreatWarningsAsErrors>False</LinkerTreatWarningsAsErrors>
<LinkerVerboseOutput>True</LinkerVerboseOutput>
<SuppressIces>ICE18;ICE45;ICE82</SuppressIces>
<SuppressSpecificWarnings>1111</SuppressSpecificWarnings>
<TreatSpecificWarningsAsErrors>2222</TreatSpecificWarningsAsErrors>
<WixVariables>Variable1=value1;Variable2=value2</WixVariables>
</PropertyGroup>

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

ParameterDescription
BindInputPathsOptional string parameter.

Specifies a binder path that should be used to locate all files. This is equivalent to the -b <path> switch.
Named BindPaths are created by prefixing the 2-or-more-character bucket name followed by an equal sign ("=") to the supplied path.
BindFilesOptional boolean parameter.

Specifies that the tool should bind files into a .wixout file. This is only valid when the OutputAsXml parameter is also provided. This is equivalent to the -bf switch.
PedanticOptional boolean parameter.

Specifies that the tool should display pedantic messages. This is equivalent to the -pedantic switch.
SuppressAllWarningsOptional boolean parameter.

Specifies that all warnings should be suppressed. This is equivalent to the -sw switch.
SuppressIntermediateFileVersionMatchingOptional boolean parameter.

Specifies that the tool should suppress intermediate file version mismatch checking. This is equivalent to the -sv switch.
SuppressSchemaValidationOptional boolean parameter.

Specifies that schema validation of documents should be suppressed. This is equivalent to the -ss switch.
SuppressSpecificWarningsOptional string parameter.

Specifies that certain warnings should be suppressed. This is equivalent to the -sw[N] switch.
TreatSpecificWarningsAsErrorsOptional string parameter.

Specifies that certain warnings should be treated as errors. This is equivalent to the -wx[N] switch.
TreatWarningsAsErrorsOptional boolean parameter.

Specifies that all warnings should be treated as errors. This is equivalent to the -wx switch.
VerboseOutputOptional 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.

<td>Optional <b>boolean</b> parameter.<br />
<br />
Specifies that the linker should allow duplicate directory identifiers. This allows duplicate directories from different libraries to be merged into the product. This is equivalent to the -ad switch in light.exe.</td>
ParameterDescription
AllowIdenticalRowsOptional boolean parameter.

Specifies that the linker should allow identical rows. Identical rows will be treated as warnings. This is equivalent to the -ai switch in light.exe.
AllowDuplicateDirectoryIds
AllowUnresolvedReferencesOptional boolean parameter.

Specifies that the linker should allow unresolved references. This will not create valid output. This is equivalent to the -au switch in light.exe.
AdditionalCubOptional string parameter.

Specifies an additional .cub file that the linker should use when running ICE validation. This is equivalent to the -cub <file.cub> switch in light.exe.
BackwardsCompatibleGuidGenerationOptional boolean parameter.

Specifies that the linker should use the backward compatible GUID generation algorithm. This is equivalent to the -bcgg switch in light.exe.
CabinetCachePathOptional string parameter.

Specifies a path that the linker should use to cache built cabinet files. This is equivalent to the -cc <path> switch in light.exe.
CabinetCreationThreadCountOptional integer parameter.

Specifies that number of threads that the linker should use when building cabinet files. This is equivalent to the -ct <N> switch in light.exe.
CulturesOptional string parameter.

Specifies a semicolon or comma delimited list of localized string cultures to load from .wxl files and libraries. Precedence of cultures is from left to right. This is equivalent to the -cultures:<cultures> switch in light.exe.
DefaultCompressionLevelOptional string parameter.

Specifies the compression level that the linker should use when building cabinet files. Valid values are low, medium, high, none and mszip. This is equivalent to the -dcl:<level> switch in light.exe.
DropUnrealTablesOptional boolean parameter.

Specifies that the linker should drop unreal tables from the output image. This is equivalent to the -dut switch in light.exe.
ExactAssemblyVersionsOptional boolean parameter.

Specifies that the linker should use exact assembly versions. This is equivalent to the -eav switch in light.exe.
IcesOptional string parameter.

Specifies that the linker should run specific internal consistency evaluators (ICEs). This is equivalent to the -ice:<ICE> switch in light.exe.
LeaveTemporaryFilesOptional boolean parameter.

Specifies that the linker should not delete temporary files. This is equivalent to the -notidy switch in light.exe.
LinkerAdditionalOptionsOptional string parameter.

Specifies additional command line parameters to append when calling light.exe.
LinkerBindInputPathsOptional string parameter.

Specifies a binder path that the linker should use to locate all files. This is equivalent to the -b <path> switch in light.exe.
Named BindPaths are created by prefixing the 2-or-more-character bucket name followed by an equal sign ("=") to the supplied path.
LinkerBindFilesOptional boolean parameter.

Specifies that the linker should bind files into a .wixout file. This is only valid when the OutputAsXml parameter is also provided. This is equivalent to the -bf switch in light.exe.
LinkerPedanticOptional boolean parameter.

Specifies that the linker should display pedantic messages. This is equivalent to the -pedantic switch in light.exe.
LinkerSuppressAllWarningsOptional boolean parameter.

Specifies that all linker warnings should be suppressed. This is equivalent to the -sw switch in light.exe.
LinkerSuppressIntermediateFileVersionMatchingOptional boolean parameter.

Specifies that the linker should suppress intermediate file version mismatch checking. This is equivalent to the -sv switch in light.exe.
LinkerSuppressSchemaValidationOptional boolean parameter.

Specifies that the linker should suppress schema validation of documents. This is equivalent to the -ss switch in light.exe.
LinkerSuppressSpecificWarningsOptional string parameter.

Specifies that certain linker warnings should be suppressed. This is equivalent to the -sw[N] switch in light.exe.
LinkerTreatSpecificWarningsAsErrorsOptional string parameter.

Specifies that certain linker warnings should be treated as errors. This is equivalent to the -wx[N] switch in light.exe.
LinkerTreatWarningsAsErrorsOptional boolean parameter.

Specifies that all linker warnings should be treated as errors. This is equivalent to the -wx switch in light.exe.
LinkerVerboseOutputOptional boolean parameter.

Specifies that the linker should provide verbose output. This is equivalent to the -v switch in light.exe.
OutputAsXmlOptional boolean parameter.

Specifies that the linker should output a .wixout file instead of a .msi file. This is equivalent to the -xo switch in light.exe.
PdbOutputFileOptional string parameter.

Specifies that the linker should create the output .wixpdb file with the provided name. This is equivalent to the -pdbout <output.wixpdb> switch in light.exe.
ReuseCabinetCacheOptional boolean parameter.

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

Specifies that the linker should add a fileVersion entry to the MsiAssemblyName table for each assembly. This is equivalent to the -fv switch in light.exe.
SuppressAclResetOptional boolean parameter.

Specifies that the linker should suppress resetting ACLs. This is useful when laying out an image to a network share. This is equivalent to the -sacl switch in light.exe.
SuppressAssembliesOptional boolean parameter.

Specifies that the linker should not get assembly name information for assemblies. This is equivalent to the -sa switch in light.exe.
SuppressDefaultAdminSequenceActionsOptional boolean parameter.

Specifies that the linker should suppress default admin sequence actions. This is equivalent to the -sadmin switch in light.exe.
SuppressDefaultAdvSequenceActionsOptional boolean parameter.

Specifies that the linker should suppress default advertised sequence actions. This is equivalent to the -sadv switch in light.exe.
SuppressDefaultUISequenceActionsOptional boolean parameter.

Specifies that the linker should suppress default UI sequence actions. This is equivalent to the -ui switch in light.exe.
SuppressFileHashAndInfoOptional boolean parameter.

Specifies that the linker should suppress gathering file information (hash, version, language, etc). This is equivalent to the -sh switch in light.exe.
SuppressFilesOptional boolean parameter.

Specifies that the linker should suppress gathering all file data. This has the same effect as setting the SuppressAssemblies adn SuppressFileHashAndInfo parameters. This is equivalent to the -sf switch in light.exe.
SuppressIcesOptional string parameter.

Specifies that the linker should suppress running specific ICEs. This is equivalent to the -sice:<ICE> switch in light.exe.
SuppressLayoutOptional boolean parameter.

Specifies that the linker should suppress layout creation. This is equivalent to the -sl switch in light.exe.
SuppressMsiAssemblyTableProcessingOptional boolean parameter.

Specifies that the linker should suppress processing the data in the MsiAssembly table. This is equivalent to the -sma switch in light.exe.
SuppressPatchSequenceDataOptional boolean parameter.

Specifies that the linker should suppress patch sequence data in patch XML to decrease bundle size and increase patch applicability performance (patch packages themselves are not modified).
SuppressPdbOutputOptional boolean parameter.

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

Specifies that the linker should suppress .msi and .msm validation. This is equivalent to the -sval switch in light.exe.
SuppressTagSectionIdAttributeOnTuplesOptional boolean parameter.

Specifies that the linker should suppress adding the sectionId attribute on rows. This is equivalent to the -sts switch in light.exe.
UnreferencedSymbolsFileOptional string parameter.

Specifies an unreferenced symbols file that the linker should use. This is equivalent to the -usf <output.xml> switch in light.exe.
WixVariablesOptional string parameter.

Specifies a semicolon-delimited list of bind-time WiX variables. This is equivalent to the -d<name>[=<value] switch in light.exe.