1
<?xml version="1.0" encoding="utf-8"?>
3
****************************************************************************************************
6
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
7
created a backup copy. Incorrect changes to this file will make it
8
impossible to load or build your projects from the command-line or the IDE.
10
This file defines the steps in the standard build process for WiX projects (.wixproj).
13
* Targets and properties that start with an underscore (_) are considered private and should not
14
be used outside of this file.
17
* Two-space indentation of nested elements
19
* Self-closing elements should have a space before the /> ("<MyProperty />")
21
* Conditions should have a space before and after the "" and between any operators. For example:
22
<MyProperty Condition=" '$(MyProperty)' == '' ">Value</MyProperty>
24
* Targets should have each attribute on a single line and indented by two spaces. Also, there
25
should be a blank line between the Target and the beginning of the contents (a blank line is
26
optional before the closing </Target> tag).
30
DependsOnTargets="$(MyTargetDependsOn)">
32
<Message Importance="low" Text="MyTarget is doing something." />
35
Copyright (c) Microsoft Corporation. All rights reserved.
36
****************************************************************************************************
39
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
40
InitialTargets="_CheckForInvalidConfigurationAndPlatform;
41
_CheckRequiredProperties">
43
//////////////////////////////////////////////////////////////////////////////////////////////////
44
//////////////////////////////////////////////////////////////////////////////////////////////////
46
//////////////////////////////////////////////////////////////////////////////////////////////////
47
//////////////////////////////////////////////////////////////////////////////////////////////////
50
<!-- Allow a user-customized targets files to be used as part of the build. -->
52
<UserTargetsPath>$(MSBuildProjectFullPath).user</UserTargetsPath>
54
<Import Project="$(UserTargetsPath)" Condition="Exists('$(UserTargetsPath)')" />
55
<Import Project="$(CustomBeforeWixTargets)" Condition=" '$(CustomBeforeWixTargets)' != '' and Exists('$(CustomBeforeWixTargets)')" />
57
<!-- These properties can be overridden to support non-default installations. -->
59
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
60
<WixTasksPath Condition=" '$(WixTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\WixTasks.dll</WixTasksPath>
61
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
62
<WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\WixTasks.dll</WixTasksPath>
63
<LuxTargetsPath Condition=" '$(LuxTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Lux.targets</LuxTargetsPath>
64
<LuxTasksPath Condition=" '$(LuxTasksPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\LuxTasks.dll</LuxTasksPath>
65
<LuxTargetsPath Condition=" '$(LuxTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Lux.targets</LuxTargetsPath>
66
<LuxTasksPath Condition=" '$(LuxTasksPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\LuxTasks.dll</LuxTasksPath>
69
<!-- This makes the project files a dependency of all targets so that things rebuild if they change -->
71
<MSBuildAllProjects Condition="Exists('$(MSBuildProjectFullPath)')">$(MSBuildAllProjects);$(MSBuildProjectFullPath)</MSBuildAllProjects>
72
<MSBuildAllProjects Condition="Exists('$(WixTargetsPath)')">$(MSBuildAllProjects);$(WixTargetsPath)</MSBuildAllProjects>
73
<MSBuildAllProjects Condition="Exists('$(LuxTargetsPath)')">$(MSBuildAllProjects);$(LuxTargetsPath)</MSBuildAllProjects>
74
<MSBuildAllProjects Condition="Exists('$(UserTargetsPath)')">$(MSBuildAllProjects);$(UserTargetsPath)</MSBuildAllProjects>
75
<MSBuildAllProjects Condition="Exists('$(CustomBeforeWixTargets)')">$(MSBuildAllProjects);$(CustomBeforeWixTargets)</MSBuildAllProjects>
76
<MSBuildAllProjects Condition="Exists('$(CustomAfterWixTargets)')">$(MSBuildAllProjects);$(CustomAfterWixTargets)</MSBuildAllProjects>
80
//////////////////////////////////////////////////////////////////////////////////////////////////
81
//////////////////////////////////////////////////////////////////////////////////////////////////
83
//////////////////////////////////////////////////////////////////////////////////////////////////
84
//////////////////////////////////////////////////////////////////////////////////////////////////
87
<!-- These tasks can be used as general-purpose build tasks. -->
88
<UsingTask TaskName="Candle" AssemblyFile="$(WixTasksPath)" />
89
<UsingTask TaskName="Insignia" AssemblyFile="$(WixTasksPath)" />
90
<UsingTask TaskName="Lit" AssemblyFile="$(WixTasksPath)" />
91
<UsingTask TaskName="Light" AssemblyFile="$(WixTasksPath)" />
92
<UsingTask TaskName="Torch" AssemblyFile="$(WixTasksPath)" />
94
<!-- These tasks are extensions for harvesting WiX source code from other sources. -->
95
<UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
96
<UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
97
<UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
99
<!-- These tasks are specific to the build process defined in this file, and are not considered general-purpose build tasks. -->
100
<UsingTask TaskName="AssignProjectConfiguration" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
101
<UsingTask TaskName="AssignTargetPath" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
102
<UsingTask TaskName="ResolveNonMSBuildProjectOutput" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
103
<UsingTask TaskName="ResolveVCProjectOutput" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
105
<UsingTask TaskName="CreateProjectReferenceDefineConstants" AssemblyFile="$(WixTasksPath)" />
106
<UsingTask TaskName="WixAssignCulture" AssemblyFile="$(WixTasksPath)" />
107
<UsingTask TaskName="ResolveWixReferences" AssemblyFile="$(WixTasksPath)"/>
108
<UsingTask TaskName="ReplaceString" AssemblyFile="$(WixTasksPath)"/>
109
<UsingTask TaskName="GetCabList" AssemblyFile="$(WixTasksPath)" />
110
<UsingTask TaskName="GetLooseFileList" AssemblyFile="$(WixTasksPath)" />
111
<UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
112
<UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
114
<!-- WiX tools are 32bit EXEs, so run them out-of-proc when MSBuild is not 32bit. -->
116
<RunWixToolsOutOfProc Condition=" '$(PROCESSOR_ARCHITECTURE)'!='x86' ">true</RunWixToolsOutOfProc>
120
Several properties must be set in the main project file, before using this .targets file.
121
However, if the properties are not set, we pick some defaults.
124
Indicates the final output location for the project or solution. When building a solution,
125
OutDir can be used to gather multiple project outputs in one location. In addition,
126
OutDir is included in AssemblySearchPaths used for resolving references.
129
This property is usually specified in the project file and is used to initialize OutDir.
130
OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
132
BaseIntermediateOutputPath:
133
This is the top level folder where all configuration specific intermediate output folders will be created.
134
Default value is obj\
136
IntermediateOutputPath:
137
This is the full intermediate Output Path, and is derived from BaseIntermediateOutputPath, if none specified
138
(eg. obj\debug). If this property is overridden, then setting BaseIntermediateOutputPath has no effect.
142
<!-- Ensure any OutputPath has a trailing slash, so it can be concatenated -->
143
<OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
144
<AssemblyName Condition=" '$(AssemblyName)'=='' ">$(MSBuildProjectName)</AssemblyName>
146
Be careful not to give OutputPath a default value in the case of an invalid Configuration/Platform.
147
We use OutputPath specifically to check for invalid configurations/platforms.
149
<OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
150
<_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
151
<_OriginalPlatform>$(Platform)</_OriginalPlatform>
152
<Configuration Condition=" '$(Configuration)'=='' ">Debug</Configuration>
153
<ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName> <!-- Example, Debug -->
154
<Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
155
<_OriginalOutputType>$(OutputType)</_OriginalOutputType>
156
<OutputType Condition=" '$(OutputType)' == '' ">Package</OutputType>
157
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
160
<PropertyGroup Condition=" '$(OutputPath)' == '' ">
162
A blank OutputPath at this point means that the user passed in an invalid Configuration/Platform
163
combination. Whether this is considered an error or a warning depends on the value of
164
$(SkipInvalidConfigurations).
166
<_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true</_InvalidConfigurationError>
167
<_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true</_InvalidConfigurationWarning>
170
<!-- Properties for the intermediate object output -->
172
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\</BaseIntermediateOutputPath>
173
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
174
<IntermediateExt Condition=" '$(IntermediateExt)' == '' ">.wixobj</IntermediateExt>
175
<CleanFile Condition=" '$(CleanFile)' == '' ">$(MSBuildProjectFile).FileList.txt</CleanFile>
178
<PropertyGroup Condition=" $(IntermediateOutputPath) == '' ">
179
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
180
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
183
<IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
186
<IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"/>
187
<FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')"/>
191
<WixToolPath Condition=" '$(WixToolPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.5@InstallRoot)</WixToolPath>
192
<WixToolPath Condition=" '$(WixToolPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.5@InstallRoot)</WixToolPath>
193
<WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixToolPath)</WixExtDir>
197
//////////////////////////////////////////////////////////////////////////////////////////////////
198
//////////////////////////////////////////////////////////////////////////////////////////////////
199
IDE Macro Property Declarations
200
//////////////////////////////////////////////////////////////////////////////////////////////////
201
//////////////////////////////////////////////////////////////////////////////////////////////////
205
IDE Macros available from both integrated builds and from command line builds.
206
The following properties are 'macros' that are available via IDE for pre and post build steps.
207
All of them should be added to WixBuildMacroCollection to ensure that they are shown in the UI.
210
<TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt>
211
<TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt>
212
<TargetExt Condition=" '$(OutputType)' == 'PatchCreation' ">.pcp</TargetExt>
213
<TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt>
214
<TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt>
218
<!-- Example, bin\Debug\ -->
219
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
220
<!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
221
<OutDir Condition=" '$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)') ">$(OutDir)\</OutDir>
223
<!-- Example, MySetup -->
224
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
226
<!-- Example, MySetup.wixproj -->
227
<ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
229
<!-- Example, .wixproj -->
230
<ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
232
<!-- Example, c:\MyProjects\MySetup\ -->
233
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
235
<!-- Example, c:\MyProjects\MySetup\MySetup.msi -->
236
<ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
238
<!-- Example, .wixpdb -->
239
<TargetPdbExt Condition=" '$(TargetPdbExt)' == '' ">.wixpdb</TargetPdbExt>
241
<!-- Example, MySetup -->
242
<TargetName Condition=" '$(TargetName)' == '' ">$(OutputName)</TargetName>
244
<!-- Example, MySetup.msi -->
245
<TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
247
<!-- Example, MySetup.wixpdb" -->
248
<TargetPdbName Condition=" '$(TargetPdbName)' == '' ">$(TargetName)$(TargetPdbExt)</TargetPdbName>
250
<!-- Example, Debug -->
251
<ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName>
253
<!-- Example, AnyCPU -->
254
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
258
<!-- Create the output path as an item so that we can use %(FullPath) on it. -->
259
<_OutputPathItem Include="$(OutDir)" />
260
<_IntermediateOutputPathItem Include="$(IntermediateOutputPath)" />
264
<!-- Example, c:\MyProjects\MySetup\bin\debug\ -->
266
Condition intentionally omitted on this one, because it causes problems
267
when we pick up the value of an environment variable named TargetDir
269
<TargetDir Condition="'$(OutDir)' != ''">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))</TargetDir>
271
<!-- Example, C:\MyProjects\MySetup\bin\debug\MySetup.msi -->
272
<TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
274
<TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetDir)$(TargetPdbName)</TargetPdbPath>
278
IDE Macros available only from integrated builds. The following properties are 'macros' that are
279
available via IDE for pre and post build steps. However, they are not defined when directly
280
building a project from the command line, only when building a solution.
283
<DevEnvDir Condition=" '$(DevEnvDir)' == '' ">*Undefined if not building from within Visual Studio*</DevEnvDir>
285
<!-- Example, MySolution -->
286
<SolutionName Condition=" '$(SolutionName)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionName>
288
<!-- Example, MySolution.sln -->
289
<SolutionFileName Condition=" '$(SolutionFileName)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionFileName>
291
<!-- Example, C:\MySolutions\MySolution\MySolution.sln -->
292
<SolutionPath Condition=" '$(SolutionPath)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionPath>
294
<!-- Example, C:\MySolutions\MySolution\ -->
295
<SolutionDir Condition=" '$(SolutionDir)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionDir>
297
<!-- Example, .sln -->
298
<SolutionExt Condition=" '$(SolutionExt)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionExt>
302
//////////////////////////////////////////////////////////////////////////////////////////////////
303
//////////////////////////////////////////////////////////////////////////////////////////////////
304
Default Harvester, Compiler, Linker, and Librarian Property Declarations
305
//////////////////////////////////////////////////////////////////////////////////////////////////
306
//////////////////////////////////////////////////////////////////////////////////////////////////
309
<!-- If WixExtension was passed in via the command line, then convert it to an ItemGroup -->
311
<WixExtension Include="$(WixExtension)" Condition=" '$(WixExtension)' != '' " />
314
<!-- Default Harvester properties-->
316
<HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
317
<HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
318
<HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
319
<HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
320
<HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
321
<HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
322
<HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
323
<HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
324
<HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
325
<HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
328
<!-- Default HarvestProjects properties -->
330
<HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
331
<HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
332
<HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
333
<HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
334
<HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
335
<HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
336
<HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
337
<HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
338
<HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
339
<HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
340
<HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
341
<HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
342
<HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
345
<!-- Default HarvestDirectory properties -->
347
<HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
348
<HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
349
<HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
350
<HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
351
<HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
352
<HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
353
<HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
354
<HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
355
<HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
356
<HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
357
<HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
360
<!-- Default HarvestFile properties -->
362
<HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
363
<HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
364
<HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
365
<HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
366
<HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
367
<HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
368
<HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
369
<HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
370
<HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
371
<HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
372
<HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
375
<!-- Defaut Compiler properties. -->
377
<CompilerNoLogo Condition=" '$(CompilerNoLogo)' == '' ">$(NoLogo)</CompilerNoLogo>
378
<CompilerSuppressAllWarnings Condition=" '$(CompilerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</CompilerSuppressAllWarnings>
379
<CompilerSuppressSpecificWarnings Condition=" '$(CompilerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</CompilerSuppressSpecificWarnings>
380
<CompilerSuppressSchemaValidation Condition=" '$(CompilerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</CompilerSuppressSchemaValidation>
381
<CompilerTreatWarningsAsErrors Condition=" '$(CompilerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</CompilerTreatWarningsAsErrors>
382
<CompilerTreatSpecificWarningsAsErrors Condition=" '$(CompilerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</CompilerTreatSpecificWarningsAsErrors>
383
<CompilerVerboseOutput Condition=" '$(CompilerVerboseOutput)' == '' ">$(VerboseOutput)</CompilerVerboseOutput>
384
<InstallerPlatform Condition=" '$(InstallerPlatform)' == '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU' ">$(Platform)</InstallerPlatform>
387
<!-- Default Lib properties. -->
389
<LibNoLogo Condition=" '$(LibNoLogo)' == '' ">$(NoLogo)</LibNoLogo>
390
<LibBindFiles Condition=" '$(LibBindFiles)' == '' ">$(BindFiles)</LibBindFiles>
391
<LibPedantic Condition=" '$(LibPedantic)' == '' ">$(Pedantic)</LibPedantic>
392
<LibSuppressAllWarnings Condition=" '$(LibSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LibSuppressAllWarnings>
393
<LibSuppressSpecificWarnings Condition=" '$(LibSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LibSuppressSpecificWarnings>
394
<LibSuppressSchemaValidation Condition=" '$(LibSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LibSuppressSchemaValidation>
395
<LibSuppressIntermediateFileVersionMatching Condition=" '$(LibSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LibSuppressIntermediateFileVersionMatching>
396
<LibTreatWarningsAsErrors Condition=" '$(LibTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LibTreatWarningsAsErrors>
397
<LibTreatSpecificWarningsAsErrors Condition=" '$(LibTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LibTreatSpecificWarningsAsErrors>
398
<LibVerboseOutput Condition=" '$(LibVerboseOutput)' == '' ">$(VerboseOutput)</LibVerboseOutput>
401
<!-- Default Linker properties. -->
403
<LinkerNoLogo Condition=" '$(LinkerNoLogo)' == '' ">$(NoLogo)</LinkerNoLogo>
404
<LinkerBaseInputPaths Condition=" '$(LinkerBaseInputPaths)' == '' ">$(BaseInputPaths)</LinkerBaseInputPaths>
405
<LinkerBindFiles Condition=" '$(LinkerBindFiles)' == '' ">$(BindFiles)</LinkerBindFiles>
406
<LinkerPedantic Condition=" '$(LinkerPedantic)' == '' ">$(Pedantic)</LinkerPedantic>
407
<LinkerSuppressAllWarnings Condition=" '$(LinkerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LinkerSuppressAllWarnings>
408
<LinkerSuppressSpecificWarnings Condition=" '$(LinkerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
409
<LinkerSuppressSchemaValidation Condition=" '$(LinkerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LinkerSuppressSchemaValidation>
410
<LinkerSuppressIntermediateFileVersionMatching Condition=" '$(LinkerSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LinkerSuppressIntermediateFileVersionMatching>
411
<LinkerTreatWarningsAsErrors Condition=" '$(LinkerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LinkerTreatWarningsAsErrors>
412
<LinkerTreatSpecificWarningsAsErrors Condition=" '$(LinkerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LinkerTreatSpecificWarningsAsErrors>
413
<LinkerVerboseOutput Condition=" '$(LinkerVerboseOutput)' == '' ">$(VerboseOutput)</LinkerVerboseOutput>
416
<!-- Default Inscribe properties. -->
418
<InscribeNoLogo Condition=" '$(InscribeNoLogo)' == '' ">$(NoLogo)</InscribeNoLogo>
419
<InscribeSuppressAllWarnings Condition=" '$(InscribeSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</InscribeSuppressAllWarnings>
420
<InscribeSuppressSpecificWarnings Condition=" '$(InscribeSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</InscribeSuppressSpecificWarnings>
421
<InscribeTreatWarningsAsErrors Condition=" '$(InscribeTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</InscribeTreatWarningsAsErrors>
422
<InscribeTreatSpecificWarningsAsErrors Condition=" '$(InscribeTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</InscribeTreatSpecificWarningsAsErrors>
423
<InscribeVerboseOutput Condition=" '$(InscribeVerboseOutput)' == '' ">$(VerboseOutput)</InscribeVerboseOutput>
426
//////////////////////////////////////////////////////////////////////////////////////////////////
427
//////////////////////////////////////////////////////////////////////////////////////////////////
429
//////////////////////////////////////////////////////////////////////////////////////////////////
430
//////////////////////////////////////////////////////////////////////////////////////////////////
434
============================================================
435
_CheckForInvalidConfigurationAndPlatform
437
This target checks for errors in statically defined properties. It always
438
gets executed before any other target.
439
============================================================
442
Name="_CheckForInvalidConfigurationAndPlatform">
444
<Error Condition=" '$(_InvalidConfigurationError)' == 'true' " Text="The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='$(_OriginalConfiguration)' Platform='$(_OriginalPlatform)'"/>
445
<Warning Condition=" '$(_InvalidConfigurationWarning)' == 'true' " Text="The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='$(_OriginalConfiguration)' Platform='$(_OriginalPlatform)'"/>
447
<Message Text="Configuration=$(Configuration)" Importance="Low" />
448
<Message Text="Platform=$(Platform)" Importance="Low" />
450
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
451
<Error Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" Text="The OutDir property must end with a trailing slash." />
452
<Error Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')" Text="The BaseIntermediateOutputPath must end with a trailing slash." />
453
<Error Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')" Text="The IntermediateOutputPath must end with a trailing slash." />
458
==================================================================================================
459
_CheckRequiredProperties
461
Checks properties that must be set in the main project file or on the command line before
462
using this .TARGETS file.
465
$(OutputName) - The name of the MSI/MSM/wixlib to build (without the extension)
466
$(OutputType) - Possible values are 'package', 'PatchCreation', 'module', 'library', 'bundle'
467
==================================================================================================
470
<_PleaseSetThisInProjectFile>Please set this in the project file before the <Import> of the wix.targets file.</_PleaseSetThisInProjectFile>
471
<_OutputTypeDescription>The OutputType defines whether a Windows Installer package (.msi), PatchCreation (.pcp), merge module (.msm), wix library (.wixlib), or self-extracting executable (.exe) is being built. $(_PleaseSetThisInProjectFile) Possible values are 'Package', 'Module', 'Library', and 'Bundle'.</_OutputTypeDescription>
473
<Target Name="_CheckRequiredProperties">
477
Condition=" '$(OutputName)' == '' "
478
Text="The OutputName property is not set in project "$(MSBuildProjectFile)". The OutputName defines the name of the output without a file extension. $(_PleaseSetThisInProjectFile)" />
482
Condition=" '$(_OriginalOutputType)' == '' "
483
Text="The OutputType property is not set in project "$(MSBuildProjectFile)". Defaulting to 'Package'. $(_OutputTypeDescription)" />
487
Condition=" '$(OutputType)' != 'Package' and '$(OutputType)' != 'PatchCreation' and '$(OutputType)' != 'Module' and '$(OutputType)' != 'Library' and '$(OutputType)' != 'Bundle' "
488
Text="The OutputType property '$(OutputType)' is not valid in project "$(MSBuildProjectFile)". $(_OutputTypeDescription)" />
490
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
493
Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')"
494
Text="The OutDir property must end with a trailing slash." />
499
//////////////////////////////////////////////////////////////////////////////////////////////////
500
//////////////////////////////////////////////////////////////////////////////////////////////////
502
//////////////////////////////////////////////////////////////////////////////////////////////////
503
//////////////////////////////////////////////////////////////////////////////////////////////////
507
==================================================================================================
510
The main build entry point.
511
==================================================================================================
522
DependsOnTargets="$(BuildDependsOn)"
523
Outputs="$(TargetPath)">
527
==================================================================================================
530
Redefine this target in your project in order to run tasks just before Build.
531
==================================================================================================
533
<Target Name="BeforeBuild" />
536
==================================================================================================
539
Redefine this target in your project in order to run tasks just after Build.
540
==================================================================================================
542
<Target Name="AfterBuild" />
545
==================================================================================================
548
The core build step calls each of the build targets.
549
==================================================================================================
557
AddCompilerDefineConstants;
563
</CoreBuildDependsOn>
567
DependsOnTargets="$(CoreBuildDependsOn)">
570
ExecuteTargets="_TimeStampAfterCompileAndLink;PostBuildEvent"
571
Condition=" '$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnOutputUpdated' " />
573
<OnError ExecuteTargets="_CleanRecordFileWrites" />
578
==================================================================================================
581
Delete all intermediate and final build outputs, and then build the project from scratch.
582
==================================================================================================
588
$(MSBuildProjectDefaultTargets);
592
<RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' ">
602
DependsOnTargets="$(RebuildDependsOn)"
603
Outputs="$(TargetPath)" />
606
==================================================================================================
609
Redefine this target in your project in order to run tasks just before Rebuild.
610
==================================================================================================
612
<Target Name="BeforeRebuild" />
615
==================================================================================================
618
Redefine this target in your project in order to run tasks just after Rebuild.
619
==================================================================================================
621
<Target Name="AfterRebuild" />
624
==================================================================================================
627
This target is called only when doing a real build. It is not called during project load.
628
==================================================================================================
631
<BuildingProject>false</BuildingProject>
633
<Target Name="BuildOnlySettings">
635
<CreateProperty Value="true">
636
<Output TaskParameter="Value" PropertyName="BuildingProject" />
642
==================================================================================================
645
Prepare the prerequisites for building.
646
==================================================================================================
649
<PrepareForBuildDependsOn></PrepareForBuildDependsOn>
652
Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)">
655
These CreateProperty calls are required because TargetDir and TargetPath are defined
656
to contain an item list. We want that item list to be expanded so that it can be used
657
as a regular property value and not as an item-list-with-transform.
659
<CreateProperty Value="$(TargetDir)">
660
<Output TaskParameter="Value" PropertyName="TargetDir" />
663
<CreateProperty Value="$(TargetPath)">
664
<Output TaskParameter="Value" PropertyName="TargetPath" />
667
<CreateProperty Value="$(TargetPdbPath)">
668
<Output TaskParameter="Value" PropertyName="TargetPdbPath" />
671
<!-- Create the directories for intermediate and final build products. -->
672
<MakeDir Directories="$(IntermediateOutputPath);$(OutDir)" />
676
==================================================================================================
677
ResolveWixExtensionReferences
679
Resolves WiX extension references to full paths. Any properties you use
680
to resolve paths to extensions must be defined before importing this
681
file or the extensions will be automatically resolved to $(WixExtDir).
684
@(WixExtension) - WixExtension item group
687
@(_ResolvedWixExtensionPaths) - Item group with full paths to extensions
688
==================================================================================================
691
<ResolveWixExtensionReferencesDependsOn>
693
</ResolveWixExtensionReferencesDependsOn>
696
Name="ResolveWixExtensionReferences"
697
DependsOnTargets="$(ResolveWixExtensionReferencesDependsOn)"
698
Condition=" '@(WixExtension)' != ''">
701
The WixExtensionSearchPaths property is set to find assemblies in the following order:
703
(1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
704
(2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
705
(3) Treat the reference's Include as if it were a real file name.
706
(4) Path specified by the WixExtDir property.
708
<CreateProperty Condition=" '$(WixExtensionSearchPaths)' == '' " Value="
714
<Output TaskParameter="Value" PropertyName="WixExtensionSearchPaths" />
717
<ResolveWixReferences
718
WixReferences="@(WixExtension)"
719
SearchPaths="$(WixExtensionSearchPaths)"
720
SearchFilenameExtensions=".dll">
721
<Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixExtensionPaths" />
722
</ResolveWixReferences>
724
<!-- Remove duplicate extension items that would cause build errors -->
725
<RemoveDuplicates Inputs="@(_AllResolvedWixExtensionPaths)">
726
<Output TaskParameter="Filtered" ItemName="_ResolvedWixExtensionPaths" />
731
==================================================================================================
734
Run the pre-build event if there is one.
735
==================================================================================================
738
<PreBuildEventDependsOn>GetTargetPath</PreBuildEventDependsOn>
742
DependsOnTargets="$(PreBuildEventDependsOn)"
743
Condition=" '$(PreBuildEvent)' != '' ">
746
Text="$(PreBuildEvent)"
747
OldValue="!(TargetPath)"
748
NewValue="$(TargetPath)">
750
<Output TaskParameter="Text" PropertyName="ExpandedPreBuildEvent" />
754
Text="$(ExpandedPreBuildEvent)"
755
OldValue="!(TargetPdbPath)"
756
NewValue="$(TargetPdbPath)">
758
<Output TaskParameter="Text" PropertyName="ExpandedPreBuildEvent" />
761
<Exec WorkingDirectory="$(OutDir)" Command="$(ExpandedPreBuildEvent)" />
765
//////////////////////////////////////////////////////////////////////////////////////////////////
766
//////////////////////////////////////////////////////////////////////////////////////////////////
767
Resolve References Targets
768
//////////////////////////////////////////////////////////////////////////////////////////////////
769
//////////////////////////////////////////////////////////////////////////////////////////////////
773
==================================================================================================
775
==================================================================================================
778
<ResolveReferencesDependsOn>
779
BeforeResolveReferences;
780
AssignProjectConfiguration;
781
ResolveProjectReferences;
782
ResolveWixLibraryReferences;
783
ResolveWixExtensionReferences;
784
AfterResolveReferences
785
</ResolveReferencesDependsOn>
788
Name="ResolveReferences"
789
DependsOnTargets="$(ResolveReferencesDependsOn)" />
792
==================================================================================================
793
BeforeResolveReferences
795
Redefine this target in your project in order to run tasks just before ResolveReferences.
796
==================================================================================================
798
<Target Name="BeforeResolveReferences" />
801
==================================================================================================
802
AfterResolveReferences
804
Redefine this target in your project in order to run tasks just after ResolveReferences.
805
==================================================================================================
807
<Target Name="AfterResolveReferences" />
810
==================================================================================================
811
AssignProjectConfiguration
813
Assign the appropriate configuration to each project in the list of project references passed in.
816
@(ProjectReference) - the list of all project references
819
@(_ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects)
820
==================================================================================================
823
Name="AssignProjectConfiguration"
824
Condition=" '@(ProjectReference)' != '' ">
826
<!-- Assign a project configuration to each project reference if we're building a solution file. -->
827
<AssignProjectConfiguration
828
ProjectReferences="@(ProjectReference)"
829
CurrentProjectConfiguration="$(Configuration)"
830
CurrentProjectPlatform="$(Platform)"
831
SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)">
833
<Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration" />
834
<Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
835
</AssignProjectConfiguration>
837
<!-- Add in the source project path so that we can have access to it after resolving the output. -->
839
<_ProjectReferenceWithConfiguration>
840
<MSBuildSourceProjectFileFullPath>%(FullPath)</MSBuildSourceProjectFileFullPath>
841
</_ProjectReferenceWithConfiguration>
847
==================================================================================================
848
_SplitProjectReferencesByFileExistence
850
Split referenced projects into two lists: those that exist on disk and those that don't.
853
@(NonVCProjectReference) - the list of non-VC project references (MSBuild and potentially VSIP projects)
856
@(_MSBuildProjectReferenceExistent) - the list of non-VC project references that exist on disk
857
@(_MSBuildProjectReferenceNonexistent) - the list of non-VC project references that don't exist on disk
858
==================================================================================================
861
Name="_SplitProjectReferencesByFileExistence">
864
Use this task for matching projects with pre-resolved project outputs set by the IDE if building
865
inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll use MSBuild
866
to resolve MSBuild projects. This task will resolve VSIP (3rd party) project references and
867
create a new item list with only project references to projects in the MSBuild format.
869
<ResolveNonMSBuildProjectOutput
870
ProjectReferences="@(_ProjectReferenceWithConfiguration)"
871
PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)"
872
Condition=" '$(BuildingInsideVisualStudio)' == 'true' and '@(_ProjectReferenceWithConfiguration)'!=''">
874
<Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths" />
875
<Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference" />
877
</ResolveNonMSBuildProjectOutput>
880
If building from the command line, simply copy the _ProjectReferenceWithConfiguration item list to
881
_MSBuildProjectReference, since we have to assume all non-VC projects are in the MSBuild format.
882
We have no way of building VSIP (3rd party) projects from the command line.
885
<_MSBuildProjectReference Include="@(_ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(_ProjectReferenceWithConfiguration)'!=''"/>
888
<!-- Break the project list into two lists: those that exist on disk and those that don't. -->
890
<_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')"/>
891
<_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')"/>
897
================================================================================================
898
ResolveProjectReferences
900
Builds all of the referenced projects to get their outputs.
903
@(NonVCProjectReference) - The list of non-VC project references.
906
@(_ProjectReferenceWithConfiguration) - The list of non-VC project references.
907
================================================================================================
910
Name="ResolveProjectReferences"
911
DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence"
912
Condition=" '@(_ProjectReferenceWithConfiguration)' != '' ">
915
When building this project from the IDE or when building a .sln from the command line, just
916
gather the referenced build outputs. The code that builds the .sln will already have built
917
the project, so there's no need to do it again here.
919
The ContinueOnError setting is here so that, during project load, as much information as
920
possible will be passed to the compilers.
923
Projects="@(_MSBuildProjectReferenceExistent)"
924
Targets="GetTargetPath"
925
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
926
Condition="'@(_ProjectReferenceWithConfiguration)'!='' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '@(_MSBuildProjectReferenceExistent)' != ''"
927
ContinueOnError="!$(BuildingProject)">
929
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" />
930
<Output TaskParameter="TargetOutputs" ItemName="_MSBuildResolvedProjectReferencePaths" />
934
Build referenced projects when building from the command line.
936
The $(ProjectReferenceBuildTargets) will normally be blank so that the project's default target
937
is used during a P2P reference. However if a custom build process requires that the referenced
938
project has a different target to build it can be specified.
941
Projects="@(_MSBuildProjectReferenceExistent)"
942
Targets="$(ProjectReferenceBuildTargets)"
943
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
944
Condition="'@(_ProjectReferenceWithConfiguration)'!='' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != ''">
946
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" />
947
<Output TaskParameter="TargetOutputs" ItemName="_MSBuildResolvedProjectReferencePaths" />
951
VC project references must build GetNativeTargetPath because neither GetTargetPath nor the return of the default build
952
target return the output for a native C++ project.
953
This will not produce duplicate paths because GetNativeTargetPath is mutually exclusive with GetTargetPath & Build TargetOutputs.
956
Projects="@(_MSBuildProjectReferenceExistent)"
957
Targets="GetNativeTargetPath"
958
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration); %(_MSBuildProjectReferenceExistent.SetPlatform)"
959
Condition="'@(_ProjectReferenceWithConfiguration)'!='' and '%(_MSBuildProjectReferenceExistent.Extension)' == '.vcxproj'">
961
<Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" />
962
<Output TaskParameter="TargetOutputs" ItemName="_MSBuildResolvedProjectReferencePaths" />
965
<!-- Issue a warning for each non-existent project. -->
967
Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
968
Condition=" '@(_ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)'!=''"/>
970
<!-- Create list of all .wixlib project references-->
972
Include="@(_ResolvedProjectReferencePaths)"
973
Condition=" '%(Extension)' == '.wixlib' ">
975
<Output TaskParameter="Include" ItemName="WixLibProjects" />
981
================================================================================================
984
This stand-alone target returns the name of the build product (i.e. MSI, MSM) that would be
985
produced if we built this project.
986
================================================================================================
989
<GetTargetPathDependsOn>
992
</GetTargetPathDependsOn>
996
DependsOnTargets="$(GetTargetPathDependsOn)"
997
Outputs="$(TargetPath)" />
1000
============================================================
1001
GetResolvedReferencePaths
1002
This allows the Referenced Projects to return more information than the build output.
1003
============================================================
1006
Name="GetResolvedReferencePaths"
1007
Outputs="$(ResolvedTargetPath)" />
1010
================================================================================================
1011
ResolveWixLibraryReferences
1013
Resolve the library references to full paths.
1016
@(WixLibrary) - The list of .wixlib files.
1019
@(_ResolvedWixLibraryPaths) - Item group with full paths to libraries
1020
================================================================================================
1023
<ResolveWixLibraryReferencesDependsOn>
1025
</ResolveWixLibraryReferencesDependsOn>
1028
Name="ResolveWixLibraryReferences"
1029
DependsOnTargets="$(ResolveWixLibraryReferencesDependsOn)"
1030
Condition=" '@(WixLibrary)' != ''">
1033
The WixLibrarySearchPaths property is set to find assemblies in the following order:
1035
(1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
1036
(2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
1037
(3) Treat the reference's Include as if it were a real file name.
1038
(4) Path specified by the WixExtDir property.
1040
<CreateProperty Condition=" '$(WixLibrarySearchPaths)' == '' " Value="
1046
<Output TaskParameter="Value" PropertyName="WixLibrarySearchPaths" />
1049
<ResolveWixReferences
1050
WixReferences="@(WixLibrary)"
1051
SearchPaths="$(WixLibrarySearchPaths)"
1052
SearchFilenameExtensions=".wixlib">
1053
<Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixLibraryPaths" />
1054
</ResolveWixReferences>
1056
<!-- Remove duplicate library items that would cause build errors -->
1057
<RemoveDuplicates Inputs="@(_AllResolvedWixLibraryPaths)">
1058
<Output TaskParameter="Filtered" ItemName="_ResolvedWixLibraryPaths" />
1064
//////////////////////////////////////////////////////////////////////////////////////////////////
1065
//////////////////////////////////////////////////////////////////////////////////////////////////
1066
Compiler Define Targets
1067
//////////////////////////////////////////////////////////////////////////////////////////////////
1068
//////////////////////////////////////////////////////////////////////////////////////////////////
1072
==================================================================================================
1073
AddCompilerDefineConstants
1075
Adds solution and project references to the constants passed into the compiler.
1076
==================================================================================================
1079
<AddCompilerDefineConstantsDependsOn>
1081
AddSolutionDefineConstants;
1082
AddProjectReferenceDefineConstants;
1083
</AddCompilerDefineConstantsDependsOn>
1086
Name="AddCompilerDefineConstants"
1087
DependsOnTargets="$(AddCompilerDefineConstantsDependsOn)">
1089
<CreateProperty Value="
1090
Configuration=$(ConfigurationName);
1092
Platform=$(PlatformName);
1093
ProjectDir=$(ProjectDir);
1094
ProjectExt=$(ProjectExt);
1095
ProjectFileName=$(ProjectFileName);
1096
ProjectName=$(ProjectName);
1097
ProjectPath=$(ProjectPath);
1098
TargetDir=$(TargetDir);
1099
TargetExt=$(TargetExt);
1100
TargetFileName=$(TargetFileName);
1101
TargetName=$(TargetName);
1102
TargetPath=$(TargetPath);
1104
<Output TaskParameter="Value" PropertyName="ProjectDefineConstants" />
1110
==================================================================================================
1111
AddSolutionDefineConstants
1113
Adds solution references to the constants passed into the compiler, but only when building
1114
from the Visual Studio IDE or when building a solution file via the command line.
1117
$(SolutionDefineConstants) - the list of solution variables to be passed into the compiler
1118
==================================================================================================
1121
<DefineSolutionProperties Condition=" '$(DefineSolutionProperties)' == '' ">true</DefineSolutionProperties>
1124
Name="AddSolutionDefineConstants"
1125
Condition=" '$(DefineSolutionProperties)' == 'true' ">
1128
Text="Solution properties are only available during IDE builds or when building the solution file from the command line. To turn off this warning set <DefineSolutionProperties>false</DefineSolutionProperties> in your .wixproj file."
1129
Condition=" '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildingSolutionFile)' != 'true' " />
1131
<CreateProperty Value="$(SolutionDefineConstants);DevEnvDir=$(DevEnvDir)" Condition=" '$(DevEnvDir)' != '' ">
1132
<Output TaskParameter="Value" PropertyName="SolutionDefineConstants" />
1134
<CreateProperty Value="$(SolutionDefineConstants);SolutionDir=$(SolutionDir)" Condition=" '$(SolutionDir)' != '' ">
1135
<Output TaskParameter="Value" PropertyName="SolutionDefineConstants" />
1137
<CreateProperty Value="$(SolutionDefineConstants);SolutionExt=$(SolutionExt)" Condition=" '$(SolutionExt)' != '' ">
1138
<Output TaskParameter="Value" PropertyName="SolutionDefineConstants" />
1140
<CreateProperty Value="$(SolutionDefineConstants);SolutionFileName=$(SolutionFileName)" Condition=" '$(SolutionFileName)' != '' ">
1141
<Output TaskParameter="Value" PropertyName="SolutionDefineConstants" />
1143
<CreateProperty Value="$(SolutionDefineConstants);SolutionName=$(SolutionName)" Condition=" '$(SolutionName)' != '' ">
1144
<Output TaskParameter="Value" PropertyName="SolutionDefineConstants" />
1146
<CreateProperty Value="$(SolutionDefineConstants);SolutionPath=$(SolutionPath)" Condition=" '$(SolutionPath)' != '' ">
1147
<Output TaskParameter="Value" PropertyName="SolutionDefineConstants" />
1153
==================================================================================================
1154
AddProjectReferenceDefineConstants
1156
Adds project references to the constants passed into the compiler.
1159
@(_ResolvedProjectReferencePaths) - paths to projects' outputs
1160
$(VSProjectConfigurations) - map of project names to configurations, provided by VS when building in the IDE
1163
$(ProjectReferenceDefineConstants) - the list of referenced project variables to be passed into the compiler
1164
==================================================================================================
1167
Name="AddProjectReferenceDefineConstants"
1168
Condition=" '@(_ResolvedProjectReferencePaths)' != '' ">
1170
<CreateProjectReferenceDefineConstants
1171
ProjectReferencePaths="@(_ResolvedProjectReferencePaths)"
1172
ProjectConfigurations="$(VSProjectConfigurations)">
1174
<Output TaskParameter="DefineConstants" PropertyName="ProjectReferenceDefineConstants" />
1175
</CreateProjectReferenceDefineConstants>
1179
//////////////////////////////////////////////////////////////////////////////////////////////////
1180
//////////////////////////////////////////////////////////////////////////////////////////////////
1181
CompileAndLink Targets
1182
//////////////////////////////////////////////////////////////////////////////////////////////////
1183
//////////////////////////////////////////////////////////////////////////////////////////////////
1187
==================================================================================================
1189
==================================================================================================
1192
<CompileAndLinkDependsOn>
1194
BeforeCompileAndLink;
1195
_TimeStampBeforeCompileAndLink;
1197
ConvertBundleReferences;
1203
_TimeStampAfterCompileAndLink;
1205
</CompileAndLinkDependsOn>
1208
Name="CompileAndLink"
1209
DependsOnTargets="$(CompileAndLinkDependsOn)" />
1212
==================================================================================================
1213
BeforeCompileAndLink
1215
Redefine this target in your project in order to run tasks just before CompileAndLink.
1216
==================================================================================================
1218
<Target Name="BeforeCompileAndLink" />
1221
==================================================================================================
1224
Redefine this target in your project in order to run tasks just after CompileAndLink.
1225
==================================================================================================
1227
<Target Name="AfterCompileAndLink" />
1230
==================================================================================================
1231
_TimeStampBeforeCompileAndLink
1233
Record a timestamp so that we can compare it to a new timestamp during PostBuildEvent if
1235
==================================================================================================
1238
Name="_TimeStampBeforeCompileAndLink" >
1240
<CreateItem Include="$(TargetPath)">
1241
<Output TaskParameter="Include" ItemName="TargetOutput" />
1244
<CreateItem Include="%(TargetOutput.ModifiedTime)">
1245
<Output TaskParameter="Include" PropertyName="_TargetOutputTimestampBeforeCompileAndLink" />
1251
==================================================================================================
1252
_TimeStampAfterCompileAndLink
1254
Take before and after timestamps so that we can compare them (used by post-build events that
1255
are set to fire "OnOutputUpdated").
1256
==================================================================================================
1259
Name="_TimeStampAfterCompileAndLink">
1261
<CreateItem Include="%(TargetOutput.ModifiedTime)">
1262
<Output TaskParameter="Include" PropertyName="_TargetOutputTimestampAfterCompileAndLink" />
1265
<!-- if our target path was updated by compile & link, and it's an "inscribe-able" output type,
1266
then add it to the list of things to be inscribed -->
1267
<CreateItem Include="$(TargetPath)"
1268
Condition="'$(_TargetOutputTimestampBeforeCompileAndLink)' != '$(_TargetOutputTimestampAfterCompileAndLink)'
1269
and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module')
1270
and '$(InscribeMainOutput)' == 'true'" >
1272
<Output TaskParameter="Include" ItemName="Inscribe"/>
1278
==================================================================================================
1280
==================================================================================================
1291
DependsOnTargets="$(HarvestDependsOn)" />
1294
==================================================================================================
1296
==================================================================================================
1299
<GenerateCodeDependsOn>
1300
RefreshGeneratedFile;
1301
RefreshBundleGeneratedFile
1302
</GenerateCodeDependsOn>
1304
<Target Name="GenerateCode"
1305
DependsOnTargets="$(GenerateCodeDependsOn)" />
1308
==================================================================================================
1310
==================================================================================================
1324
DependsOnTargets="$(SigningDependsOn)" />
1327
==================================================================================================
1330
Redefine this target in your project in order to run tasks just before all signing tasks.
1331
==================================================================================================
1333
<Target Name="BeforeSigning" />
1336
==================================================================================================
1339
Redefine this target in your project in order to sign the cabs of your database.
1340
==================================================================================================
1342
<Target Name="SignCabs" />
1345
==================================================================================================
1348
Redefine this target in your project in order to sign your database, after it has been inscribed
1349
with the signatures of your signed cabs
1350
==================================================================================================
1352
<Target Name="SignMsi" />
1355
==================================================================================================
1358
Redefine this target in your project in order to run tasks just after all signing tasks.
1359
==================================================================================================
1361
<Target Name="AfterSigning" />
1364
================================================================================================
1367
Converts project references to HeatProject items to auto generate authoring.
1368
================================================================================================
1371
Name="ConvertReferences"
1372
Condition=" ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module' ) ">
1375
<_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
1376
<DirectoryIds>%(_MSBuildProjectReferenceExistent.RefTargetDir)</DirectoryIds>
1377
<ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
1378
<ProjectName>%(_MSBuildProjectReferenceExistent.Name)</ProjectName>
1379
<HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
1380
</_HeatProjectReference>
1381
<HeatProject Include="@(_HeatProjectReference)" />
1385
Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
1386
Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
1389
<!-- Unconditionally generate Compile items so they are always linked in. -->
1390
<Compile Include="$(HarvestProjectsGeneratedFile)" />
1391
<_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
1397
================================================================================================
1398
ConvertBundleReferences
1400
Converts project references in Bundle projects to HeatProject items to auto generate authoring.
1401
================================================================================================
1404
Name="ConvertBundleReferences"
1405
Condition=" ('$(OutputType)' == 'Bundle')">
1408
<_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
1409
<ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
1410
<GenerateType>payloadgroup</GenerateType>
1411
<HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
1412
</_HeatProjectReference>
1413
<HeatProject Include="@(_HeatProjectReference)" />
1417
Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
1418
Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
1421
<!-- Unconditionally generate Compile items so they are always linked in. -->
1422
<Compile Include="$(HarvestProjectsGeneratedFile)" />
1423
<_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
1429
================================================================================================
1430
CombineHarvestProjects
1432
Combines HeatProject and HarvestProject items together and ensures each has HeatOutput metadata.
1433
================================================================================================
1435
<Target Name="CombineHarvestProjects"
1436
Condition=" '@(HeatProject)' != '' or '@(HarvestProject)' != '' ">
1438
<!-- Add default HeatOutputs for those without one specified -->
1439
<CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' == '' "
1440
AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HeatProject.Filename).wxs">
1441
<Output TaskParameter="Include" ItemName="_AllHeatProjects" />
1443
<CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' == '' "
1444
AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HarvestProject.Filename).wxs">
1445
<Output TaskParameter="Include" ItemName="_AllHeatProjects" />
1449
<CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' != '' ">
1450
<Output TaskParameter="Include" ItemName="_AllHeatProjects" />
1452
<CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' != '' ">
1453
<Output TaskParameter="Include" ItemName="_AllHeatProjects" />
1459
================================================================================================
1462
Harvests outputs of other MSBuild projects files using the VS project extension to heat.exe.
1467
- The list of projects to harvest. HeatProject is provided for backward compatibility.
1468
You should use HarvestProject instead.
1470
%(HarvestProject.Transforms)
1471
%(HeatProject.Transforms)
1472
- XSL transforms to apply to the harvested WiX.
1474
%(HarvestProject.ProjectOutputGroups)
1475
%(HeatProjects.ProjectOutputGroups)
1476
- The project output groups to harvest
1480
- The generated .wxs files which are added to the @(Compile) item list.
1481
================================================================================================
1483
<ItemDefinitionGroup>
1485
<Transforms>$(HarvestProjectsTransforms)</Transforms>
1486
<ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
1487
<DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
1490
<Transforms>$(HarvestProjectsTransforms)</Transforms>
1491
<ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
1492
<DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
1494
</ItemDefinitionGroup>
1497
<HarvestProjectsDependsOn>CombineHarvestProjects</HarvestProjectsDependsOn>
1499
<Target Name="HarvestProjects"
1500
DependsOnTargets="$(HarvestProjectsDependsOn)"
1501
Inputs="@(_AllHeatProjects);%(_AllHeatProjects.Transforms);$(MSBuildAllProjects);$(ProjectPath)"
1502
Outputs="@(_AllHeatProjects -> '%(HeatOutput)')"
1503
Condition=" '@(HeatProject)' != '' or '@(HarvestProject)' != '' ">
1506
NoLogo="$(HarvestProjectsNoLogo)"
1507
SuppressAllWarnings="$(HarvestProjectsSuppressAllWarnings)"
1508
SuppressSpecificWarnings="$(HarvestProjectsSuppressSpecificWarnings)"
1509
ToolPath="$(WixToolPath)"
1510
TreatWarningsAsErrors="$(HarvestProjectsTreatWarningsAsErrors)"
1511
TreatSpecificWarningsAsErrors="$(HarvestProjectsTreatSpecificWarningsAsErrors)"
1512
VerboseOutput="$(HarvestProjectsVerboseOutput)"
1513
AutogenerateGuids="$(HarvestProjectsAutogenerateGuids)"
1514
GenerateGuidsNow="$(HarvestProjectsGenerateGuidsNow)"
1515
OutputFile="%(_AllHeatProjects.HeatOutput)"
1516
SuppressFragments="$(HarvestProjectsSuppressFragments)"
1517
SuppressUniqueIds="$(HarvestProjectsSuppressUniqueIds)"
1518
Transforms="%(_AllHeatProjects.Transforms)"
1519
Project="%(_AllHeatProjects.FullPath)"
1520
ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)"
1521
GenerateType="%(_AllHeatProjects.GenerateType)"
1522
DirectoryIds="%(_AllHeatProjects.DirectoryIds)"
1523
ProjectName="%(_AllHeatProjects.ProjectName)"
1524
Configuration="%(_AllHeatProjects.Configuration)"
1525
Platform="%(_AllHeatProjects.Platform)"
1526
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
1527
GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
1528
AdditionalOptions="$(HarvestProjectsAdditionalOptions)">
1530
<Output TaskParameter="OutputFile" ItemName="Compile" />
1531
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
1538
================================================================================================
1541
Harvests directories using heat.exe.
1544
@(HarvestDirectory) - The list of directories to harvest.
1545
%(HarvestDirectory.Transforms) - XSL transforms to apply to the harvested WiX.
1546
%(HarvestDirectory.ComponentGroupName) - The name of the ComponentGroup to create.
1547
%(HarvestDirectory.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
1548
%(HarvestDirectory.KeepEmptyDirectories) - Whether to create Directory entries for empty directories.
1549
%(HarvestDirectory.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
1550
%(HarvestDirectory.SuppressCom) - Suppress COM elements.
1551
%(HarvestDirectory.SuppressRootDirectory) - Suppress a Directory element for the root directory.
1552
$(HarvestDirectory.SuppressRegistry) - Suppress registry harvesting.
1555
$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs
1556
- The generated .wxs files which are added to the @(Compile) item list.
1557
================================================================================================
1560
<ItemDefinitionGroup>
1562
<Transforms>$(HarvestDirectoryTransforms)</Transforms>
1563
<ComponentGroupName>$(HarvestDirectoryComponentGroupName)</ComponentGroupName>
1564
<DirectoryRefId>$(HarvestDirectoryDirectoryRefId)</DirectoryRefId>
1565
<KeepEmptyDirectories>$(HarvestDirectoryKeepEmptyDirectories)</KeepEmptyDirectories>
1566
<PreprocessorVariable>$(HarvestDirectoryPreprocessorVariable)</PreprocessorVariable>
1567
<SuppressCom>$(HarvestDirectorySuppressCom)</SuppressCom>
1568
<SuppressRootDirectory>$(HarvestDirectorySuppressRootDirectory)</SuppressRootDirectory>
1569
<SuppressRegistry>$(HarvestDirectorySuppressRegistry)</SuppressRegistry>
1571
</ItemDefinitionGroup>
1574
<HarvestDirectoryDependsOn>
1575
GetHarvestDirectoryContent
1576
</HarvestDirectoryDependsOn>
1579
<!-- Creates items to include content since wildcards will not work in Target/@Inputs. -->
1580
<Target Name="GetHarvestDirectoryContent">
1581
<CreateItem Include="@(HarvestDirectory->'%(FullPath)\**\*')">
1582
<Output TaskParameter="Include" ItemName="_HarvestDirectoryContent" />
1586
<Target Name="HarvestDirectory"
1587
DependsOnTargets="$(HarvestDirectoryDependsOn)"
1588
Inputs="@(_HarvestDirectoryContent);%(HarvestDirectory.Transforms)"
1589
Outputs="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
1590
Condition=" '@(HarvestDirectory)' != '' ">
1593
NoLogo="$(HarvestDirectoryNoLogo)"
1594
SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
1595
SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
1596
ToolPath="$(WixToolPath)"
1597
TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
1598
TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
1599
VerboseOutput="$(HarvestDirectoryVerboseOutput)"
1600
AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
1601
GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
1602
OutputFile="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
1603
SuppressFragments="$(HarvestDirectorySuppressFragments)"
1604
SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
1605
Transforms="%(HarvestDirectory.Transforms)"
1606
Directory="@(HarvestDirectory)"
1607
ComponentGroupName="%(HarvestDirectory.ComponentGroupName)"
1608
DirectoryRefId="%(HarvestDirectory.DirectoryRefId)"
1609
KeepEmptyDirectories="%(HarvestDirectory.KeepEmptyDirectories)"
1610
PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)"
1611
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
1612
SuppressCom="%(HarvestDirectory.SuppressCom)"
1613
SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
1614
SuppressRegistry="%(HarvestDirectory.SuppressRegistry)"
1615
AdditionalOptions="$(HarvestDirectoryAdditionalOptions)">
1617
<Output TaskParameter="OutputFile" ItemName="Compile" />
1618
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
1625
================================================================================================
1628
Harvests files of different types using heat.exe. This can harvest registry from
1629
self-registering files, files with typelibs, and more.
1632
@(HarvestFile) - The list of files to harvest.
1633
%(HarvestFile.Transforms) - XSL transforms to apply to the harvested WiX.
1634
%(HarvestFile.ComponentGroupName) - The name of the ComponentGroup to create.
1635
%(HarvestFile.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
1636
%(HarvestFile.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
1637
%(HarvestFile.SuppressCom) - Suppress COM elements.
1638
%(HarvestFile.SuppressRootDirectory) - Suppress a Directory element for the root directory.
1639
$(HarvestFile.SuppressRegistry) - Suppress registry harvesting.
1642
$(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs
1643
- The generated .wxs files which are added to the @(Compile) item list.
1644
================================================================================================
1647
<ItemDefinitionGroup>
1649
<Transforms>$(HarvestFileTransforms)</Transforms>
1650
<ComponentGroupName>$(HarvestFileComponentGroupName)</ComponentGroupName>
1651
<DirectoryRefId>$(HarvestFileDirectoryRefId)</DirectoryRefId>
1652
<PreprocessorVariable>$(HarvestFilePreprocessorVariable)</PreprocessorVariable>
1653
<SuppressCom>$(HarvestFileSuppressCom)</SuppressCom>
1654
<SuppressRegistry>$(HarvestFileSuppressRegistry)</SuppressRegistry>
1655
<SuppressRootDirectory>$(HarvestFileSuppressRootDirectory)</SuppressRootDirectory>
1657
</ItemDefinitionGroup>
1660
<HarvestFileDependsOn></HarvestFileDependsOn>
1662
<Target Name="HarvestFile"
1663
DependsOnTargets="$(HarvestFileDependsOn)"
1664
Inputs="@(HarvestFile);%(HarvestFile.Transforms)"
1665
Outputs="$(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs"
1666
Condition=" '@(HarvestFile)' != '' ">
1669
NoLogo="$(HarvestFileNoLogo)"
1670
SuppressAllWarnings="$(HarvestFileSuppressAllWarnings)"
1671
SuppressSpecificWarnings="$(HarvestFileSuppressSpecificWarnings)"
1672
ToolPath="$(WixToolPath)"
1673
TreatWarningsAsErrors="$(HarvestFileTreatWarningsAsErrors)"
1674
TreatSpecificWarningsAsErrors="$(HarvestFileTreatSpecificWarningsAsErrors)"
1675
VerboseOutput="$(HarvestFileVerboseOutput)"
1676
AutogenerateGuids="$(HarvestFileAutogenerateGuids)"
1677
GenerateGuidsNow="$(HarvestFileGenerateGuidsNow)"
1678
OutputFile="$(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs"
1679
SuppressFragments="$(HarvestFileSuppressFragments)"
1680
SuppressUniqueIds="$(HarvestFileSuppressUniqueIds)"
1681
Transforms="%(HarvestFile.Transforms)"
1682
File="@(HarvestFile)"
1683
ComponentGroupName="%(HarvestFile.ComponentGroupName)"
1684
DirectoryRefId="%(HarvestFile.DirectoryRefId)"
1685
PreprocessorVariable="%(HarvestFile.PreprocessorVariable)"
1686
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
1687
SuppressCom="%(HarvestFile.SuppressCom)"
1688
SuppressRegistry="%(HarvestFile.SuppressRegistry)"
1689
SuppressRootDirectory="%(HarvestFile.SuppressRootDirectory)"
1690
AdditionalOptions="$(HarvestFileAdditionalOptions)">
1692
<Output TaskParameter="OutputFile" ItemName="Compile" />
1693
<Output TaskParameter="OutputFile" ItemName="FileWrites" />
1700
================================================================================================
1701
RefreshGeneratedFile
1703
Generates code based on metadata defined in project references.
1706
@(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
1709
@(_GeneratedFiles) - The generated source file.
1710
================================================================================================
1713
<RefreshGeneratedFileDependsOn></RefreshGeneratedFileDependsOn>
1715
<Target Name="RefreshGeneratedFile"
1716
DependsOnTargets="$(RefreshGeneratedFileDependsOn)"
1717
Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
1718
Outputs="@(_GeneratedFiles)"
1719
Condition=" ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') and '@(_GeneratedFiles)' != '' ">
1721
<RefreshGeneratedFile
1722
GeneratedFiles="@(_GeneratedFiles)"
1723
ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
1728
================================================================================================
1729
RefreshBundleGeneratedFile
1731
Generates code for bundle projects based on metadata defined in project references.
1734
@(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
1737
@(_GeneratedFiles) - The generated source file.
1738
================================================================================================
1741
<RefreshBundleGeneratedFileDependsOn></RefreshBundleGeneratedFileDependsOn>
1743
<Target Name="RefreshBundleGeneratedFile"
1744
DependsOnTargets="$(RefreshBundleGeneratedFileDependsOn)"
1745
Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
1746
Outputs="@(_GeneratedFiles)"
1747
Condition=" '$(OutputType)' == 'Bundle' and '@(_GeneratedFiles)' != '' ">
1749
<RefreshBundleGeneratedFile
1750
GeneratedFiles="@(_GeneratedFiles)"
1751
ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
1756
================================================================================================
1757
GenerateCompileWithObjectPath
1759
Generates metadata on the for compile output objects.
1761
================================================================================================
1764
<GenerateCompileWithObjectPathDependsOn></GenerateCompileWithObjectPathDependsOn>
1766
<Target Name="GenerateCompileWithObjectPath"
1767
Condition=" '@(Compile)' != '' ">
1770
<_CompileWithObjectPath Include="@(Compile)">
1771
<!-- If RelativeDir is not rooted and not in IntermediateOutputPath, and ObjectPath is undefined use IntermediateOutputPath\RelativeDir -->
1772
<ObjectPath Condition=" '%(RelativeDir)%(FileName)%(Extension)' != '%(FullPath)' AND '%(RelativeDir)%(FileName)%(Extension)' != '$(IntermediateOutputPath)%(FileName)%(Extension)' AND '%(Compile.ObjectPath)' == '' " >$(IntermediateOutputPath)%(RelativeDir)</ObjectPath>
1773
<!-- If RelativeDir is rooted or in IntermediateOutputPath, and ObjectPath is undefined use IntermediateOutputPath -->
1774
<ObjectPath Condition=" ('%(RelativeDir)%(FileName)%(Extension)' == '%(FullPath)' OR '%(RelativeDir)%(FileName)%(Extension)' == '$(IntermediateOutputPath)%(FileName)%(Extension)') AND '%(Compile.ObjectPath)' == '' " >$(IntermediateOutputPath)</ObjectPath>
1775
</_CompileWithObjectPath>
1781
================================================================================================
1784
Compiles the wxs files into wixobj files using candle.exe.
1787
@(Compile) - The list of wxs files to compile.
1788
@(Content) - Files that the project uses in the installer.
1789
@(WixExtension) - The list of wixlib or wix dll extensions.
1792
@(CompileObjOutput) - The compiled .wixobj files.
1793
================================================================================================
1798
ResolveWixExtensionReferences;
1799
GenerateCompileWithObjectPath
1806
@(_ResolvedWixExtensionPaths);
1807
@(_ResolvedProjectReferencePaths);
1808
$(MSBuildAllProjects)"
1809
Outputs="@(_CompileWithObjectPath -> '%(ObjectPath)%(Filename)$(IntermediateExt)')"
1810
DependsOnTargets="$(CompileDependsOn)"
1811
Condition=" '@(Compile)' != '' ">
1814
SourceFiles="@(_CompileWithObjectPath)"
1815
AdditionalOptions="$(CompilerAdditionalOptions)"
1816
DefineConstants="$(DefineConstants);$(SolutionDefineConstants);$(ProjectDefineConstants);$(ProjectReferenceDefineConstants)"
1817
ExtensionDirectory="$(WixExtDir)"
1818
Extensions="@(_ResolvedWixExtensionPaths)"
1819
FipsCompliant="$(FipsCompliant)"
1820
SuppressFilesVitalByDefault="$(SuppressFilesVitalByDefault)"
1821
PreprocessToStdOut="$(PreprocessToStdOut)"
1822
PreprocessToFile="$(PreprocessToFile)"
1823
IncludeSearchPaths="$(IncludeSearchPaths)"
1824
InstallerPlatform="$(InstallerPlatform)"
1825
NoLogo="$(CompilerNoLogo)"
1826
OnlyValidateDocuments="$(OnlyValidateDocuments)"
1827
OutputFile="%(_CompileWithObjectPath.ObjectPath)"
1828
Pedantic="$(Pedantic)"
1829
ReferencePaths="$(ReferencePaths)"
1830
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
1831
ShowSourceTrace="$(ShowSourceTrace)"
1832
SuppressAllWarnings="$(CompilerSuppressAllWarnings)"
1833
SuppressSchemaValidation="$(CompilerSuppressSchemaValidation)"
1834
SuppressSpecificWarnings="$(CompilerSuppressSpecificWarnings)"
1835
ToolPath="$(WixToolPath)"
1836
TreatWarningsAsErrors="$(CompilerTreatWarningsAsErrors)"
1837
TreatSpecificWarningsAsErrors="$(CompilerTreatSpecificWarningsAsErrors)"
1838
VerboseOutput="$(CompilerVerboseOutput)">
1842
<CompileObjOutput Include="@(_CompileWithObjectPath -> '%(ObjectPath)%(Filename)$(IntermediateExt)')" />
1847
================================================================================================
1850
To be called after signing an MSI's cabs - inscribes an MSI with the digital signature of its
1854
@(Inscribe) - The list of database files to inscribe - database files will be modified in-place.
1856
================================================================================================
1861
ResolveWixExtensionReferences;
1864
</InscribeDependsOn>
1868
DependsOnTargets="$(InscribeDependsOn)"
1869
Condition=" '@(Inscribe)' != '' and '$(OutputCabList)' != ''">
1872
DatabaseFiles="@(Inscribe)"
1873
ToolPath="$(WixToolPath)"
1874
NoLogo="$(InscribeNoLogo)"
1875
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
1876
SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
1877
SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
1878
TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
1879
TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
1880
VerboseOutput="$(InscribeVerboseOutput)"
1881
AdditionalOptions="$(InscribeAdditionalOptions)">
1886
================================================================================================
1889
Links the .wixobj, .wxl, .wixlib, wix extensions into a .wixlib file using lit.exe.
1892
@(CompileObjOutput) - The compiled .wixobj file.
1893
@(EmbeddedResource) - The list of wxl files to use for localization.
1894
@(WixObject) - The list of .wixobj files.
1895
@(WixLibrary) - The list of .wixlib files.
1896
@(WixExtension) - The list of wix dll extension files.
1899
$(TargetPath) - The compiled .wixlib file.
1900
================================================================================================
1905
ResolveWixExtensionReferences
1910
Inputs="@(CompileObjOutput);
1911
@(EmbeddedResource);
1914
@(_ResolvedWixExtensionPaths);
1915
$(MSBuildAllProjects)"
1916
Outputs="$(TargetPath)"
1917
DependsOnTargets="$(LibDependsOn)"
1918
Condition=" '$(OutputType)' == 'Library' ">
1921
ObjectFiles="@(CompileObjOutput);@(WixObject);@(WixLibProjects);@(WixLibrary)"
1922
AdditionalOptions="$(LibAdditionalOptions)"
1923
BaseInputPaths="$(LinkerBaseInputPaths)"
1924
BindFiles="$(LibBindFiles)"
1925
ExtensionDirectory="$(WixExtDir)"
1926
Extensions="@(_ResolvedWixExtensionPaths)"
1927
LocalizationFiles="@(EmbeddedResource)"
1928
NoLogo="$(LibNoLogo)"
1929
OutputFile="$(TargetPath)"
1930
Pedantic="$(LibPedantic)"
1931
ReferencePaths="$(ReferencePaths)"
1932
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
1933
SuppressAllWarnings="$(LibSuppressAllWarnings)"
1934
SuppressIntermediateFileVersionMatching="$(LibSuppressIntermediateFileVersionMatching)"
1935
SuppressSchemaValidation="$(LibSuppressSchemaValidation)"
1936
SuppressSpecificWarnings="$(LibSuppressSpecificWarnings)"
1937
ToolPath="$(WixToolPath)"
1938
TreatWarningsAsErrors="$(LibTreatWarningsAsErrors)"
1939
VerboseOutput="$(LibVerboseOutput)" />
1943
================================================================================================
1946
Determines the final list of culture groups to build based on either the Cultures property or
1947
those specified in .wxl files.
1949
Culture groups specified in the Cultures property must be specified as a semi-colon
1950
delimited list of groups, with comma-delimited cultures within a group.
1952
<Cultures>en-US,en;en-GB,en</Cultures>
1953
This will build 2 targets, outputing to en-US and en-GB sub-folders. Light will first look
1954
for strings in the first culture (en-US or en-GB) then the second (en).
1956
Cultures of .wxl files will be used when the Culture property is not set. The culture of a
1957
.wxl file is determined by the Culture attribute in the WixLocalization element in the file
1959
Sets the OutputFolder metadata on each culture group. In most cases this is the same as the
1960
first culture in the culture group. When the Culture's property is unspecified and no .wxl
1961
files are provided this is the same as the output directory. When the Culture's property
1962
specifies a single culture group and no .wxl files are provided this is the same as the output
1965
Updates the TargetPath and TargetPdbPath properties to be used in subsequent targets.
1968
@(EmbeddedResource) - The list of wxl files to use for localization.
1969
$(Cultures) - The list of culture groups to build.
1972
@(CultureGroup) - The list of culture group strings with OutputFolder metadata
1973
$(TargetPath) - Property list of target link output MSIs/MSMs
1974
$(TargetPdbPath) - Property list of target output pdbs
1976
================================================================================================
1979
Name="AssignCultures"
1980
Condition=" ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module')">
1983
Cultures="$(Cultures)"
1984
Files="@(EmbeddedResource)"
1987
<Output TaskParameter="CultureGroups" ItemName="CultureGroup" />
1990
<!-- Build an itemgroup of outputs -->
1992
Include="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)">
1993
<Output TaskParameter="Include"
1994
ItemName="_TargetPathItems"/>
1997
<!-- Convert the itemgroup to a semicolon-delimited property -->
1999
Value="@(_TargetPathItems)">
2000
<Output TaskParameter="Value"
2001
PropertyName="TargetPath"/>
2004
<!-- Build an itemgroup of PDB outputs -->
2006
Include="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetPdbExt)">
2007
<Output TaskParameter="Include"
2008
ItemName="_TargetPdbPathItems"/>
2011
<!-- Convert the itemgroup to a semicolon-delimited property -->
2013
Value="@(_TargetPdbPathItems)">
2014
<Output TaskParameter="Value"
2015
PropertyName="TargetPdbPath"/>
2020
================================================================================================
2023
Links the .wixobj, .wxl, .wixlib, wix extensions into an .msi or .msm file using light.exe,
2024
once per culture group. All WXL files are passed into light and the culture switch determines
2028
@(CompileObjOutput) - The compiled .wixobj file.
2029
@(CultureGroup) - The cultures to build
2030
@(EmbeddedResource) - The list of wxl files to use for localization.
2031
@(WixObject) - The list of .wixobj files.
2032
@(WixLibrary) - The list of .wixlib files.
2033
@(WixExtension) - The list of wix dll extension files.
2036
$(TargetDir)\%(Culture)\$(TargetName)$(TargetExt) - The compiled .msi, .msm, or .exe files.
2037
================================================================================================
2049
Inputs="@(CompileObjOutput);
2050
@(EmbeddedResource);
2052
@(_ResolvedProjectReferencePaths);
2053
@(_ResolvedWixLibraryPaths);
2054
@(_ResolvedWixExtensionPaths);
2055
$(MSBuildAllProjects)"
2056
Outputs="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)"
2057
DependsOnTargets="$(LinkDependsOn)"
2058
Condition=" ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module' or '$(OutputType)' == 'Bundle')">
2060
<CreateProperty Condition=" '$(OutputType)' != 'Bundle' " Value="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetPdbExt)">
2061
<Output TaskParameter="Value" PropertyName="PdbOutputFile" />
2064
<!-- Call light using the culture subdirectory for output -->
2066
ObjectFiles="@(CompileObjOutput);@(WixObject);@(WixLibProjects);@(_ResolvedWixLibraryPaths)"
2067
AdditionalOptions="$(LinkerAdditionalOptions)"
2068
AllowIdenticalRows="$(AllowIdenticalRows)"
2069
AllowUnresolvedReferences="$(AllowUnresolvedReferences)"
2070
AdditionalCub="$(AdditionalCub)"
2071
BackwardsCompatibleGuidGeneration="$(BackwardsCompatibleGuidGeneration)"
2072
BaseInputPaths="$(LinkerBaseInputPaths)"
2073
BindFiles="$(LinkerBindFiles)"
2074
CabinetCachePath="$(CabinetCachePath)"
2075
CabinetCreationThreadCount="$(CabinetCreationThreadCount)"
2076
Cultures="%(CultureGroup.Identity)"
2077
CustomBinder="$(CustomBinder)"
2078
DefaultCompressionLevel="$(DefaultCompressionLevel)"
2079
DropUnrealTables="$(DropUnrealTables)"
2080
ExactAssemblyVersions="$(ExactAssemblyVersions)"
2081
ExtensionDirectory="$(WixExtDir)"
2082
Extensions="@(_ResolvedWixExtensionPaths)"
2084
LeaveTemporaryFiles="$(LeaveTemporaryFiles)"
2085
LocalizationFiles="@(EmbeddedResource)"
2086
NoLogo="$(LinkerNoLogo)"
2087
OutputAsXml="$(OutputAsXml)"
2088
OutputFile="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)"
2089
PdbOutputFile="$(PdbOutputFile)"
2090
Pedantic="$(LinkerPedantic)"
2091
ReferencePaths="$(ReferencePaths)"
2092
ReuseCabinetCache="$(ReuseCabinetCache)"
2093
RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
2094
SetMsiAssemblyNameFileVersion="$(SetMsiAssemblyNameFileVersion)"
2095
SuppressAclReset="$(SuppressAclReset)"
2096
SuppressAllWarnings="$(LinkerSuppressAllWarnings)"
2097
SuppressAssemblies="$(SuppressAssemblies)"
2098
SuppressDefaultAdminSequenceActions="$(SuppressDefaultAdminSequenceActions)"
2099
SuppressDefaultAdvSequenceActions="$(SuppressDefaultAdvSequenceActions)"
2100
SuppressDefaultUISequenceActions="$(SuppressDefaultUISequenceActions)"
2101
SuppressFileHashAndInfo="$(SuppressFileHashAndInfo)"
2102
SuppressFiles="$(SuppressFiles)"
2103
SuppressIntermediateFileVersionMatching="$(LinkerSuppressIntermediateFileVersionMatching)"
2104
SuppressIces="$(SuppressIces)"
2105
SuppressLayout="$(SuppressLayout)"
2106
SuppressLocalization="$(SuppressLocalization)"
2107
SuppressMsiAssemblyTableProcessing="$(SuppressMsiAssemblyTableProcessing)"
2108
SuppressPdbOutput="$(SuppressPdbOutput)"
2109
SuppressSchemaValidation="$(LinkerSuppressSchemaValidation)"
2110
SuppressValidation="$(SuppressValidation)"
2111
SuppressSpecificWarnings="$(LinkerSuppressSpecificWarnings)"
2112
SuppressTagSectionIdAttributeOnTuples="$(SuppressTagSectionIdAttributeOnTuples)"
2113
ToolPath="$(WixToolPath)"
2114
TreatWarningsAsErrors="$(LinkerTreatWarningsAsErrors)"
2115
UnreferencedSymbolsFile="$(UnreferencedSymbolsFile)"
2116
VerboseOutput="$(LinkerVerboseOutput)"
2117
WixVariables="$(WixVariables)" />
2119
<GetCabList Database="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)"
2120
Condition="('$(OutputType)' == 'Package' or '$(OutputType)' == 'Module') and '$(OutputAsXml)' != 'true' " >
2121
<Output TaskParameter="CabList" PropertyName="OutputCabs" />
2122
<Output TaskParameter="CabList" ItemName="FileWrites" />
2125
<GetLooseFileList Database="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)"
2126
Condition="('$(OutputType)' == 'Package' or '$(OutputType)' == 'Module') and '$(OutputAsXml)' != 'true' " >
2127
<Output TaskParameter="LooseFileList" ItemName="FileWrites" />
2130
<CreateItem Include="$(OutputCabs)" >
2131
<Output TaskParameter="Include" ItemName="OutputCabList" />
2137
//////////////////////////////////////////////////////////////////////////////////////////////////
2138
//////////////////////////////////////////////////////////////////////////////////////////////////
2139
IncrementalClean Targets
2140
//////////////////////////////////////////////////////////////////////////////////////////////////
2141
//////////////////////////////////////////////////////////////////////////////////////////////////
2145
==================================================================================================
2148
Remove files that were produced in a prior build but weren't produced in the current build.
2149
The reason is that if, for example, the name of the .msi/.msm has changed we want to delete the
2152
Leave the Clean cache file containing only the files produced in the current build.
2153
==================================================================================================
2156
Name="IncrementalClean"
2157
DependsOnTargets="_CleanGetCurrentAndPriorFileWrites">
2159
<!-- Subtract list of files produced in prior builds from list of files produced in this build. -->
2160
<CreateItem Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanCurrentFileWrites)">
2161
<Output TaskParameter="Include" ItemName="_CleanOrphanFileWrites" />
2164
<!-- Find all files in the final output directory. -->
2165
<FindUnderPath Path="$(OutDir)" Files="@(_CleanOrphanFileWrites)">
2166
<Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInOutput" />
2169
<!-- Find all files in the intermediate output directory. -->
2170
<FindUnderPath Path="$(IntermediateOutputPath)" Files="@(_CleanOrphanFileWrites)">
2171
<Output TaskParameter="InPath" ItemName="_CleanOrphanFileWritesInIntermediate" />
2174
<!-- Delete the orphaned files. -->
2176
Files="@(_CleanOrphanFileWritesInIntermediate);@(_CleanOrphanFileWritesInOutput)"
2177
TreatErrorsAsWarnings="true">
2179
<Output TaskParameter="DeletedFiles" ItemName="_CleanOrphanFilesDeleted" />
2182
<!-- Create a list of everything that wasn't deleted. -->
2183
<CreateItem Include="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)" Exclude="@(_CleanOrphanFilesDeleted)">
2184
<Output TaskParameter="Include" ItemName="_CleanRemainingFileWritesAfterIncrementalClean" />
2187
<!-- Remove duplicates. -->
2188
<RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterIncrementalClean)">
2189
<Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWritesAfterIncrementalClean" />
2192
<!-- Make sure the directory exists. -->
2193
<MakeDir Directories="$(IntermediateOutputPath)" />
2195
<!-- Write new list of current files back to disk, replacing the existing list.-->
2197
File="$(IntermediateOutputPath)$(CleanFile)"
2198
Lines="@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)"
2204
==================================================================================================
2205
_CleanGetCurrentAndPriorFileWrites
2207
Get the list of files built in the current build and in prior builds.
2208
==================================================================================================
2211
Name="_CleanGetCurrentAndPriorFileWrites"
2212
DependsOnTargets="_CheckForCompileAndLinkOutputs">
2214
<!-- Read the list of files produced by a prior builds from disk. -->
2215
<ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
2216
<Output TaskParameter="Lines" ItemName="_CleanPriorFileWrites" />
2217
</ReadLinesFromFile>
2219
<!-- Find all files in the final output directory. -->
2220
<FindUnderPath Path="$(OutDir)" Files="@(FileWrites)">
2221
<Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInOutput" />
2224
<!-- Find all files in the intermediate output directory. -->
2225
<FindUnderPath Path="$(IntermediateOutputPath)" Files="@(FileWrites)">
2226
<Output TaskParameter="InPath" ItemName="_CleanCurrentFileWritesInIntermediate" />
2229
<!-- Remove duplicates from files produced in this build. -->
2230
<RemoveDuplicates Inputs="@(_CleanCurrentFileWritesInOutput);@(_CleanCurrentFileWritesInIntermediate)">
2231
<Output TaskParameter="Filtered" ItemName="_CleanCurrentFileWrites" />
2237
==================================================================================================
2238
_CheckForCompileAndLinkOutputs
2240
Checks each file output from the main CompileAndLink target to make sure they really exist.
2241
If they do, then record them in the clean cache.
2242
==================================================================================================
2244
<Target Name="_CheckForCompileAndLinkOutputs">
2246
<!--Record the main compile outputs -->
2247
<CreateItem Include="@(CompileObjOutput)" Condition="Exists('%(FullPath)')">
2248
<Output TaskParameter="Include" ItemName="FileWrites" />
2251
<!-- Record the link ouput(s) -->
2252
<!-- Stuff into an itemgroup -->
2253
<CreateItem Include="$(TargetPath);$(TargetPdbPath)">
2254
<Output TaskParameter="Include" ItemName="_TempTargetOutputs" />
2257
<CreateItem Include="@(_TempTargetOutputs)" Condition="Exists('%(FullPath)')">
2258
<Output TaskParameter="Include" ItemName="FileWrites" />
2263
//////////////////////////////////////////////////////////////////////////////////////////////////
2264
//////////////////////////////////////////////////////////////////////////////////////////////////
2266
//////////////////////////////////////////////////////////////////////////////////////////////////
2267
//////////////////////////////////////////////////////////////////////////////////////////////////
2271
==================================================================================================
2274
Delete all intermediate and final build outputs.
2275
==================================================================================================
2280
CleanReferencedProjects;
2287
DependsOnTargets="$(CleanDependsOn)" />
2290
==================================================================================================
2293
Redefine this target in your project in order to run tasks just before Clean.
2294
==================================================================================================
2296
<Target Name="BeforeClean" />
2299
==================================================================================================
2302
Redefine this target in your project in order to run tasks just after Clean.
2303
==================================================================================================
2305
<Target Name="AfterClean" />
2308
==================================================================================================
2309
CleanReferencedProjects
2311
Call Clean target on all Referenced Projects.
2312
==================================================================================================
2315
Name="CleanReferencedProjects">
2319
When building the project directly from the command-line, clean those referenced projects that
2320
exist on disk. For IDE builds and command-line .SLN builds, the solution build manager takes
2324
Projects="@(_MSBuildProjectReferenceExistent)"
2326
Condition=" '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildingSolutionFile)' != 'true' and '@(_MSBuildProjectReferenceExistent)' != '' " /-->
2331
==================================================================================================
2334
Cleans all of the compile and link outputs as well as any intermediate files generated along
2336
==================================================================================================
2339
<CoreCleanDependsOn></CoreCleanDependsOn>
2343
DependsOnTargets="$(CoreCleanDependsOn)">
2345
<!-- Read in list of files that were written to disk in past builds. -->
2346
<ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
2347
<Output TaskParameter="Lines" ItemName="_CleanPriorFileWrites" />
2348
</ReadLinesFromFile>
2350
<!-- Find all files in the final output directory. -->
2351
<FindUnderPath Path="$(OutDir)" Files="@(_CleanPriorFileWrites)">
2352
<Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInOutput" />
2355
<!-- Find all files in the intermediate output directory. -->
2356
<FindUnderPath Path="$(IntermediateOutputPath)" Files="@(_CleanPriorFileWrites)">
2357
<Output TaskParameter="InPath" ItemName="_CleanPriorFileWritesInIntermediate" />
2360
<!-- Delete those files. -->
2361
<Delete Files="@(_CleanPriorFileWritesInOutput);@(_CleanPriorFileWritesInIntermediate)" TreatErrorsAsWarnings="true">
2362
<Output TaskParameter="DeletedFiles" ItemName="_CleanPriorFileWritesDeleted" />
2365
<!-- Create a list of everything that wasn't deleted. -->
2366
<CreateItem Include="@(_CleanPriorFileWrites)" Exclude="@(_CleanPriorFileWritesDeleted)">
2367
<Output TaskParameter="Include" ItemName="_CleanRemainingFileWritesAfterClean" />
2370
<!-- Remove duplicates. -->
2371
<RemoveDuplicates Inputs="@(_CleanRemainingFileWritesAfterClean)">
2372
<Output TaskParameter="Filtered" ItemName="_CleanUniqueRemainingFileWrites" />
2375
<!-- Make sure the directory exists. -->
2376
<MakeDir Directories="$(IntermediateOutputPath)" />
2378
<!-- Write new list of current files back to disk. -->
2379
<WriteLinesToFile File="$(IntermediateOutputPath)$(CleanFile)" Lines="@(_CleanUniqueRemainingFileWrites)" Overwrite="true" />
2384
==================================================================================================
2385
_CleanRecordFileWrites
2387
Save the list of all files written to disk so that it can be used for "Clean" later.
2388
Files written in prior builds are not removed from Clean cache.
2389
==================================================================================================
2392
Name="_CleanRecordFileWrites"
2393
DependsOnTargets="_CleanGetCurrentAndPriorFileWrites">
2395
<!-- Merge list of files from prior builds with the current build and then remove duplicates. -->
2396
<RemoveDuplicates Inputs="@(_CleanPriorFileWrites);@(_CleanCurrentFileWrites)">
2397
<Output TaskParameter="Filtered" ItemName="_CleanUniqueFileWrites" />
2400
<!-- Make sure the directory exists. -->
2401
<MakeDir Directories="$(IntermediateOutputPath)" />
2403
<!-- Write merged file list back to disk, replacing existing contents. -->
2405
File="$(IntermediateOutputPath)$(CleanFile)"
2406
Lines="@(_CleanUniqueFileWrites)"
2412
//////////////////////////////////////////////////////////////////////////////////////////////////
2413
//////////////////////////////////////////////////////////////////////////////////////////////////
2414
PostBuildEvent Targets
2415
//////////////////////////////////////////////////////////////////////////////////////////////////
2416
//////////////////////////////////////////////////////////////////////////////////////////////////
2420
==================================================================================================
2423
Run the post-build event. This step is driven by two parameters:
2425
1) $(RunPostBuildEvent) is set by the user through the IDE and can be one of four values:
2426
1) OnBuildSuccess: In this case, every step of the build must succeed for the post-build
2428
2) <Blank>: This is the same as OnBuildSuccess.
2429
3) OnOutputUpdated: In this case, the post-build step will run only if the main output was
2431
4) Always: The post-build step is always run.
2433
2) $(_TargetOutputTimestampBeforeCompileAndLink) and $(_TargetOutputTimestampAfterCompileAndLink)
2434
are set by the _TimeStampBeforeCompileAndLink and _TimeStampAfterCompileAndLink targets. If
2435
the output was actually rebuilt during this build, then the two values will be different.
2436
==================================================================================================
2439
<PostBuildEventDependsOn>GetTargetPath</PostBuildEventDependsOn>
2442
Name="PostBuildEvent"
2443
Condition=" '$(PostBuildEvent)' != '' and
2444
( '$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_TargetOutputTimestampBeforeCompileAndLink)' != '$(_TargetOutputTimestampAfterCompileAndLink)' )"
2445
DependsOnTargets="$(PostBuildEventDependsOn)">
2448
Text="$(PostBuildEvent)"
2449
OldValue="!(TargetPath)"
2450
NewValue="$(TargetPath)">
2452
<Output TaskParameter="Text" PropertyName="ExpandedPostBuildEvent" />
2456
Text="$(ExpandedPostBuildEvent)"
2457
OldValue="!(TargetPdbPath)"
2458
NewValue="$(TargetPdbPath)">
2460
<Output TaskParameter="Text" PropertyName="ExpandedPostBuildEvent" />
2463
<Exec WorkingDirectory="$(OutDir)" Command="$(ExpandedPostBuildEvent)" />
2467
//////////////////////////////////////////////////////////////////////////////////////////////////
2468
//////////////////////////////////////////////////////////////////////////////////////////////////
2469
AllProjectOutputGroups Section
2470
//////////////////////////////////////////////////////////////////////////////////////////////////
2471
//////////////////////////////////////////////////////////////////////////////////////////////////
2475
==================================================================================================
2476
AllProjectOutputGroups
2478
The targets below drive output groups, which provide generic information about a
2479
project's inputs (e.g., content files, compilation sources, etc.) and built outputs
2480
(e.g., built EXE/DLL, PDB, XML documentation files, etc.)
2482
Each target may produce two kinds of items: outputs and dependencies. Outputs are
2483
items from the current project; dependencies are items that are brought into the
2484
current project as a result of referencing other projects or components.
2486
For both outputs and dependencies, the Include attribute
2487
specifies the location of the output/dependency; it must be a full path. Any number
2488
of additional attributes may be placed on an output/dependency item.
2489
==================================================================================================
2492
Name="AllProjectOutputGroups"
2494
BuiltProjectOutputGroup;
2495
DebugSymbolsProjectOutputGroup;
2496
DocumentationProjectOutputGroup;
2497
SatelliteDllsProjectOutputGroup;
2498
SourceFilesProjectOutputGroup;
2499
ContentFilesProjectOutputGroup;
2500
SGenFilesOutputGroup" />
2503
This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE.
2504
Reading an item is faster than invoking a target.
2507
<BuiltProjectOutputGroupKeyOutput Include="$(TargetPath)">
2508
<IsKeyOutput>true</IsKeyOutput>
2509
<FinalOutputPath>$(TargetPath)</FinalOutputPath>
2510
<TargetPath>$(TargetFileName)</TargetPath>
2511
</BuiltProjectOutputGroupKeyOutput>
2515
==================================================================================================
2516
BuiltProjectOutputGroup
2517
==================================================================================================
2520
<BuiltProjectOutputGroupDependsOn>PrepareForBuild;AssignCultures</BuiltProjectOutputGroupDependsOn>
2521
<AddAppConfigToBuildOutputs Condition="('$(AddAppConfigToBuildOutputs)' == '') and ('$(OutputType)' != 'library')">true</AddAppConfigToBuildOutputs>
2524
Name="BuiltProjectOutputGroup"
2525
Outputs="@(BuiltProjectOutputGroupOutput)"
2526
DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)">
2528
<!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below -->
2530
<!-- Convert intermediate items into final items; this way we can get the full path for each item -->
2532
<BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')">
2533
<!-- For compatibility with 2.0 -->
2534
<OriginalItemSpec Condition="'%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == ''">%(_BuiltProjectOutputGroupOutputIntermediate.FullPath)</OriginalItemSpec>
2535
</BuiltProjectOutputGroupOutput>
2538
<!-- Include build output(s). Different than predefined itemgroup since AssignCultures target may change it -->
2540
Include="$(TargetPath)">
2541
<Output TaskParameter="Include" ItemName="BuiltProjectOutputGroupOutput" />
2544
<GetCabList Database="@(BuiltProjectOutputGroupKeyOutput)" Condition="('$(OutputType)' == 'Package' or '$(OutputType)' == 'Module')">
2545
<Output TaskParameter="CabList" ItemName="BuiltProjectOutputGroupOutput" />
2548
<GetLooseFileList Database="@(BuiltProjectOutputGroupKeyOutput)" Condition="('$(OutputType)' == 'Package' or '$(OutputType)' == 'Module')" >
2549
<Output TaskParameter="LooseFileList" ItemName="BuiltProjectOutputGroupOutput" />
2555
==================================================================================================
2556
DebugSymbolsProjectOutputGroup
2558
Populates the Debug Symbols project output group.
2559
==================================================================================================
2562
<DebugSymbolsProjectOutputGroupDependsOn>AssignCultures</DebugSymbolsProjectOutputGroupDependsOn>
2565
Name="DebugSymbolsProjectOutputGroup"
2566
Outputs="@(DebugSymbolsProjectOutputGroupOutput)"
2567
DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)">
2569
<!-- Include build output pdb(s). Different than predefined itemgroup since AssignCultures target may change -->
2571
Include="$(TargetPdbPath)"
2572
Condition=" '$(SuppressPdbOutput)' != 'true' ">
2573
<Output TaskParameter="Include" ItemName="DebugSymbolsProjectOutputGroupOutput" />
2578
==================================================================================================
2579
DocumentationProjectOutputGroup
2581
Populates the Documentation project output group.
2582
==================================================================================================
2585
<DocumentationProjectOutputGroupDependsOn></DocumentationProjectOutputGroupDependsOn>
2588
Name="DocumentationProjectOutputGroup"
2589
Outputs="@(DocumentationProjectOutputGroupOutput)"
2590
DependsOnTargets="$(DocumentationProjectOutputGroupDependsOn)" />
2593
==================================================================================================
2594
SatelliteDllsProjectOutputGroup
2596
Populates the Satellite Files project output group.
2597
==================================================================================================
2600
<SatelliteDllsProjectOutputGroupDependsOn>PrepareForBuild</SatelliteDllsProjectOutputGroupDependsOn>
2603
Name="SatelliteDllsProjectOutputGroup"
2604
Outputs="@(SatelliteDllsProjectOutputGroupOutput)"
2605
DependsOnTargets="$(SatelliteDllsProjectOutputGroupDependsOn)" />
2608
==================================================================================================
2609
SourceFilesProjectOutputGroup
2611
Populates the Source Files project output group.
2612
Source files are items in the project whose type is "Compile" and "EmbeddedResource".
2613
==================================================================================================
2616
<SourceFilesProjectOutputGroupDependsOn>PrepareForBuild</SourceFilesProjectOutputGroupDependsOn>
2619
Name="SourceFilesProjectOutputGroup"
2620
Outputs="@(SourceFilesProjectOutputGroupOutput)"
2621
DependsOnTargets="$(SourceFilesProjectOutputGroupDependsOn)">
2623
<AssignTargetPath Files="@(Compile)" RootFolder="$(MSBuildProjectDirectory)">
2624
<Output TaskParameter="AssignedFiles" ItemName="_CompileWithTargetPath" />
2627
<AssignTargetPath Files="@(EmbeddedResource)" RootFolder="$(MSBuildProjectDirectory)">
2628
<Output TaskParameter="AssignedFiles" ItemName="_EmbeddedResourceWithTargetPath" />
2631
<!-- First we deal with Compile and EmbeddedResource -->
2632
<CreateItem Include="@(_CompileWithTargetPath->'%(FullPath)');@(_EmbeddedResourceWithTargetPath->'%(FullPath)')">
2633
<Output TaskParameter="Include" ItemName="SourceFilesProjectOutputGroupOutput" />
2636
<!-- Include the project file -->
2637
<CreateItem Include="$(MSBuildProjectFullPath)" AdditionalMetadata="TargetPath=$(ProjectFileName)">
2638
<Output TaskParameter="Include" ItemName="SourceFilesProjectOutputGroupOutput" />
2644
==================================================================================================
2645
ContentFilesProjectOutputGroup
2647
Populates the Content Files project output group.
2648
Content files are items in the project whose type is "Content".
2649
==================================================================================================
2652
<ContentFilesProjectOutputGroupDependsOn>PrepareForBuild</ContentFilesProjectOutputGroupDependsOn>
2655
Name="ContentFilesProjectOutputGroup"
2656
Outputs="@(ContentFilesProjectOutputGroupOutput)"
2657
DependsOnTargets="$(ContentFilesProjectOutputGroupDependsOn)">
2659
<AssignTargetPath Files="@(Content)" RootFolder="$(MSBuildProjectDirectory)">
2660
<Output TaskParameter="AssignedFiles" ItemName="ContentWithTargetPath" />
2663
<!-- Convert items into final items; this way we can get the full path for each item. -->
2664
<CreateItem Include="@(ContentWithTargetPath->'%(FullPath)')">
2665
<Output TaskParameter="Include" ItemName="ContentFilesProjectOutputGroupOutput" />
2671
==================================================================================================
2672
SGenFilesOutputGroup
2674
Populates the GenerateSerializationAssemblies Files project output group.
2675
GenerateSerializationAssemblies files are those generated by the GenerateSerializationAssemblies
2677
==================================================================================================
2680
<SGenFilesOutputGroupDependsOn></SGenFilesOutputGroupDependsOn>
2683
Name="SGenFilesOutputGroup"
2684
Outputs="@(SGenFilesOutputGroupOutput)"
2685
DependsOnTargets="$(SGenFilesOutputGroupDependsOn)" />
2687
<!-- Extension point: Define CustomAfterWixTargets to a .targets file that you want to include after this file. -->
2688
<Import Project="$(CustomAfterWixTargets)" Condition=" '$(CustomAfterWixTargets)' != '' and Exists('$(CustomAfterWixTargets)')" />
2690
<!-- MSBuildToolsVersion is set for MSBuild 3.5 and later, which is a requirement for lux.targets. -->
2691
<Import Project="$(LuxTargetsPath)" Condition=" '$(MSBuildToolsVersion)' != '' and '$(LuxTargetsPath)' != '' and Exists('$(LuxTargetsPath)')" />