Skip to main content
Version: v3

HeatDirectory Task

The HeatDirectory task wraps heat.exe, the WiX harvester, using the dir harvesting type. Authoring is generated for type libraries and self-registration from DllRegisterServer for any files found in directories. 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 HeatDirectory task:

<HeatDirectory
NoLogo="$(HarvestDirectoryNoLogo)"
SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
ToolPath="$(WixToolPath)"
TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
VerboseOutput="$(HarvestDirectoryVerboseOutput)"
AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
OutputFile="$(IntermediateOutputPath)_%(HarvestDirectory.Filename)_dir.wxs"
SuppressFragments="$(HarvestDirectorySuppressFragments)"
SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
Transforms="%(HarvestDirectory.Transforms)"
Directory="@(HarvestDirectory)"
ComponentGroupName="%(HarvestDirectory.ComponentGroupName)"
DirectoryRefId="%(HarvestDirectory.DirectoryRefId)"
KeepEmptyDirectories="%(HarvestDirectory.KeepEmptyDirectories)"
PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)"
SuppressCom="%(HarvestDirectory.SuppressCom)"
SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
SuppressRegistry="%(HarvestDirectory.SuppressRegistry)" />

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

ParameterDescription
NoLogoOptional boolean parameter.

Specifies that the tool logo should be suppressed. The default is false. This is equivalent to the -nologo switch.
SuppressAllWarningsOptional boolean parameter.

Specifies that all warnings should be suppressed. The default is false. This is equivalent to the -sw 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. The default is false. This is equivalent to the -wx switch.
VerboseOutputOptional boolean parameter.

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

The following table describes the parameters that are common to all heat tasks that are applicable to the HeatDirectory task.

ParameterDescription
AutogenerateGuidsOptional boolean parameter.

Whether to generate authoring that relies on auto-generation of component GUIDs. The default is $(HarvestAutogenerateGuids) if specified; otherwise, true.
GenerateGuidsNowOptional boolean parameter.

Whether to generate authoring that generates durable GUIDs when harvesting. The default is $(HarvestGenerateGuidsNow) if specified; otherwise, false.
OutputFileRequired item parameter.

Specifies the output file that contains the generated authoring.
SuppressFragmentsOptional boolean parameter.

Whether to suppress generation of separate fragments when harvesting. The default is $(HarvestSuppressFragments) if specified; otherwise, true.
SuppressUniqueIdsOptional boolean parameter.

Whether to suppress generation of unique component IDs. The default is $(HarvestSuppressUniqueIds) if specified; otherwise, false.
TransformsOptional string parameter.

XSL transforms to apply to all generated WiX authoring. Separate multiple transforms with semicolons. The default is $(HarvestTransforms) if specified.

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

ParameterDescription
DirectoryRequired item group parameter.

The list of directories to harvest.
ComponentGroupNameOptional string parameter. If you are harvesting multiple directories in your project, you should specify this metadata to create unique file names for the generated authoring.

The name of the ComponentGroup to create for all the generated authoring.
DirectoryRefIdOptional string parameter.

The ID of the directory to reference instead of TARGETDIR.
KeepEmptyDirectoriesOptional boolean parameter.

Whether to create Directory entries for empty directories.
PreprocessorVariableOptional string parameter.

Substitute SourceDir for another variable name (ex: var.Dir).
SuppressComOptional boolean parameter.

Suppress generation of COM registry elements. The default is false.
SuppressRegistryOptional boolean parameter.

Suppress generation of any registry elements. The default is false.
SuppressRootDirectoryOptional boolean parameter.

Suppress generation of a Directory element for the parent directory of the file. The default is false.