HarvestFile Target
The HarvestFile target passes HarvestFile items to the
HeatFile task to generate authoring from a file. Authoring is generated
for type libraries and self-registration from DllRegisterServer
. This
target is processed before compilation. Generated authoring is automatically added
to the Compile item group to be compiled by the
Candle task.
<ItemGroup> <HarvestFile Include="comserver.dll"> <ComponentGroupName>COM</ComponentGroupName> <DirectoryRefId>ServerDir</DirectoryRefId> </HarvestFile> </ItemGroup>
The following tables describe the common WiX MSBuild properties and items that are applicable to the HarvestFile target.
Items
The following items and item metadata are used by the HarvestFile target.
Item or Metadata | Description |
@(HarvestFile) |
Required item group. The list of files to harvest. |
%(HarvestFile.ComponentGroupName) |
Optional string metadata. The name of the ComponentGroup to create for all the generated authoring. |
%(HarvestFile.DirectoryRefId) |
Optional string metadata. The ID of the directory to reference instead of TARGETDIR. |
%(HarvestFile.PreprocessorVariable) |
Optional string metadata. Substitute SourceDir for another variable name (ex: var.Dir). |
%(HarvestFile.SuppressCom) |
Optional boolean metadata. Suppress generation of COM registry elements. The default is false. |
%(HarvestFile.SuppressRootDirectory) |
Optional boolean metadata. Suppress generation of a Directory element for the parent directory of the file. The default is false. |
%(HarvestFile.SuppressRegistry) |
Optional boolean metadata. Suppress generation of any registry elements. The default is false. |
%(HarvestFile.Transforms) |
Optional string metadata. XSL transforms to apply to the generated WiX authoring. Separate multiple transforms with semicolons. |
Properties
The following properties are used by the HarvestFile target.
Property | Description |
$(HarvestFileAutogenerateGuids) |
Optional boolean property. Whether to generate authoring that relies on auto-generation of component GUIDs. The default is $(HarvestAutogenerateGuids) if specified; otherwise, true. |
$(HarvestFileComponentGroupName) |
Optional string property. The component group name that will contain all generated authoring. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileDirectoryRefId) |
Optional string property. The identifier of the Directory element that will contain all generated authoring. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileGenerateGuidsNow) |
Optional boolean property. Whether to generate authoring that generates durable GUIDs when harvesting. The default is $(HarvestGenerateGuidsNow) if specified; otherwise, false. |
$(HarvestFileNoLogo) |
Optional boolean property. Whether to show the logo for heat.exe. The default is $(NoLogo) if specified; otherwise, false. |
$(HarvestFilePreprocessorVariable) |
Optional string property. Substitute SourceDir for another variable name (ex: var.Dir) in all generated authoring. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileSuppressAllWarnings) |
Optional boolean parameter. Specifies that all warnings should be suppressed. The default is $(HarvestSuppressAllWarnings) if specified; otherwise, false. |
$(HarvestFileSuppressCom) |
Optional boolean property. Whether to suppress generation of COM registry elements when harvesting. The default is false. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileSuppressFragments) |
Optional boolean property. Whether to suppress generation of separate fragments when harvesting. The default is $(HarvestSuppressFragments) if specified; otherwise, true. |
$(HarvestFileSuppressRegistry) |
Optional boolean property. Whether to suppress generation of all registry elements when harvesting. The default is false. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileSuppressRootDirectory) |
Optional boolean property. Whether to suppress generation of a Directory element for all authoring when harvesting. The default is false. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileSuppressSpecificWarnings) |
Optional string parameter. Specifies that certain warnings should be suppressed. The default is $(HarvestSuppressSpecificWarnings) if specified. |
$(HarvestFileSuppressUniqueIds) |
Optional boolean property. Whether to suppress generation of unique component IDs. The default is $(HarvestSuppressUniqueIds) if specified; otherwise, false. |
$(HarvestFileTransforms) |
Optional string property. XSL transforms to apply to all generated WiX authoring. Separate multiple transforms with semicolons. The default is $(HarvestTransforms) if specified. This global property is only usable with MSBuild 4.0 or Visual Studio 2010, and newer. |
$(HarvestFileTreatSpecificWarningsAsErrors) |
Optional string parameter. Specifies that certain warnings should be treated as errors. The default is $(HarvestTreatSpecificWarningsAsErrors) if specified. |
$(HarvestFileTreatWarningsAsErrors) |
Optional boolean parameter. Specifies that all warnings should be treated as errors. The default is $(HarvestTreatWarningsAsErrors) if specified; otherwise, false. |
$(HarvestFileVerboseOutput) |
Optional boolean parameter. Specifies that the tool should provide verbose output. The default is $(HarvestVerboseOutput) if specified; otherwise, false. |