-
Notifications
You must be signed in to change notification settings - Fork 0
/
wix2010.targets
3106 lines (2615 loc) · 144 KB
/
wix2010.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!--
<copyright file="wix2010.targets" company="Outercurve Foundation">
Copyright (c) 2004, Outercurve Foundation.
This software is released under Microsoft Reciprocal License (MS-RL).
The license and further copyright text can be found in the file
LICENSE.TXT at the root directory of the distribution.
</copyright>
-->
<!--
<remarks>
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file defines the steps in the standard build process for WiX projects (.wixproj).
Conventions:
* Targets and properties that start with an underscore (_) are considered private and should not
be used outside of this file.
Coding Conventions:
* Two-space indentation of nested elements
* Self-closing elements should have a space before the /> ("<MyProperty />")
* Conditions should have a space before and after the "" and between any operators. For example:
<MyProperty Condition=" '$(MyProperty)' == '' ">Value</MyProperty>
* Targets should have each attribute on a single line and indented by two spaces. Also, there
should be a blank line between the Target and the beginning of the contents (a blank line is
optional before the closing </Target> tag).
For example:
<Target
Name="MyTarget"
DependsOnTargets="$(MyTargetDependsOn)">
<Message Importance="low" Text="MyTarget is doing something." />
</Target>
</remarks>
-->
<Project
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="Build"
InitialTargets="_CheckForInvalidConfigurationAndPlatform;
_CheckRequiredProperties">
<PropertyGroup>
<WixInstallPath Condition=" '$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Installer XML\3.6@InstallRoot)</WixInstallPath>
<WixInstallPath Condition=" '$(WixInstallPath)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows Installer XML\3.6@InstallRoot)</WixInstallPath>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Extension Points
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!-- Allow a user-customized targets files to be used as part of the build. -->
<PropertyGroup>
<UserTargetsPath>$(MSBuildProjectFullPath).user</UserTargetsPath>
</PropertyGroup>
<Import Project="$(UserTargetsPath)" Condition="Exists('$(UserTargetsPath)')" />
<Import Project="$(CustomBeforeWixTargets)" Condition=" '$(CustomBeforeWixTargets)' != '' and Exists('$(CustomBeforeWixTargets)')" />
<!-- These properties can be overridden to support non-default installations. -->
<PropertyGroup>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(WixInstallPath)\WixTasks.dll</WixTasksPath>
<LuxTargetsPath Condition=" '$(LuxTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Lux.targets</LuxTargetsPath>
<LuxTargetsPath Condition=" '$(LuxTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Lux.targets</LuxTargetsPath>
<LuxTasksPath Condition=" '$(LuxTasksPath)' == '' ">$(WixInstallPath)\LuxTasks.dll</LuxTasksPath>
</PropertyGroup>
<!-- This makes the project files a dependency of all targets so that things rebuild if they change -->
<PropertyGroup>
<MSBuildAllProjects Condition="Exists('$(MSBuildProjectFullPath)')">$(MSBuildAllProjects);$(MSBuildProjectFullPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(WixTargetsPath)')">$(MSBuildAllProjects);$(WixTargetsPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(LuxTargetsPath)')">$(MSBuildAllProjects);$(LuxTargetsPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(UserTargetsPath)')">$(MSBuildAllProjects);$(UserTargetsPath)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(CustomBeforeWixTargets)')">$(MSBuildAllProjects);$(CustomBeforeWixTargets)</MSBuildAllProjects>
<MSBuildAllProjects Condition="Exists('$(CustomAfterWixTargets)')">$(MSBuildAllProjects);$(CustomAfterWixTargets)</MSBuildAllProjects>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Property Declarations
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!-- These tasks can be used as general-purpose build tasks. -->
<UsingTask TaskName="Candle" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Insignia" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Lit" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Light" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="Torch" AssemblyFile="$(WixTasksPath)" />
<!-- These tasks are extensions for harvesting WiX source code from other sources. -->
<UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
<!-- These tasks are specific to the build process defined in this file, and are not considered general-purpose build tasks. -->
<UsingTask TaskName="AssignProjectConfiguration" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="AssignTargetPath" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="ResolveNonMSBuildProjectOutput" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="ResolveVCProjectOutput" AssemblyName="Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<UsingTask TaskName="CreateItemAvoidingInference" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="CreateProjectReferenceDefineConstants" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="WixAssignCulture" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="ResolveWixReferences" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="ReplaceString" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="GetCabList" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="GetLooseFileList" AssemblyFile="$(WixTasksPath)" />
<UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
<UsingTask TaskName="GenerateCompileWithObjectPath" AssemblyFile="$(WixTasksPath)"/>
<!-- WiX tools are 32bit EXEs, so run them out-of-proc when MSBuild is not 32bit. -->
<PropertyGroup>
<RunWixToolsOutOfProc Condition=" '$(PROCESSOR_ARCHITECTURE)'!='x86' ">true</RunWixToolsOutOfProc>
</PropertyGroup>
<!--
Several properties must be set in the main project file, before using this .targets file.
However, if the properties are not set, we pick some defaults.
OutDir:
Indicates the final output location for the project or solution. When building a solution,
OutDir can be used to gather multiple project outputs in one location. In addition,
OutDir is included in AssemblySearchPaths used for resolving references.
OutputPath:
This property is usually specified in the project file and is used to initialize OutDir.
OutDir and OutputPath are distinguished for legacy reasons, and OutDir should be used if at all possible.
BaseIntermediateOutputPath:
This is the top level folder where all configuration specific intermediate output folders will be created.
Default value is obj\
IntermediateOutputPath:
This is the full intermediate Output Path, and is derived from BaseIntermediateOutputPath, if none specified
(eg. obj\debug). If this property is overridden, then setting BaseIntermediateOutputPath has no effect.
-->
<PropertyGroup>
<!-- Ensure any OutputPath has a trailing slash, so it can be concatenated -->
<OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<AssemblyName Condition=" '$(AssemblyName)'=='' ">$(MSBuildProjectName)</AssemblyName>
<!--
Be careful not to give OutputPath a default value in the case of an invalid Configuration/Platform.
We use OutputPath specifically to check for invalid configurations/platforms.
-->
<OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
<_OriginalConfiguration>$(Configuration)</_OriginalConfiguration>
<_OriginalPlatform>$(Platform)</_OriginalPlatform>
<Configuration Condition=" '$(Configuration)'=='' ">Debug</Configuration>
<ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName> <!-- Example, Debug -->
<Platform Condition=" '$(Platform)'=='' ">AnyCPU</Platform>
<_OriginalOutputType>$(OutputType)</_OriginalOutputType>
<OutputType Condition=" '$(OutputType)' == '' ">Package</OutputType>
<BuildProjectReferences Condition="'$(BuildProjectReferences)' == ''">true</BuildProjectReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(OutputPath)' == '' ">
<!--
A blank OutputPath at this point means that the user passed in an invalid Configuration/Platform
combination. Whether this is considered an error or a warning depends on the value of
$(SkipInvalidConfigurations).
-->
<_InvalidConfigurationError Condition=" '$(SkipInvalidConfigurations)' != 'true' ">true</_InvalidConfigurationError>
<_InvalidConfigurationWarning Condition=" '$(SkipInvalidConfigurations)' == 'true' ">true</_InvalidConfigurationWarning>
</PropertyGroup>
<!-- Properties for the intermediate object output -->
<PropertyGroup>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">obj\</BaseIntermediateOutputPath>
<BaseIntermediateOutputPath Condition="!HasTrailingSlash('$(BaseIntermediateOutputPath)')">$(BaseIntermediateOutputPath)\</BaseIntermediateOutputPath>
<IntermediateExt Condition=" '$(IntermediateExt)' == '' ">.wixobj</IntermediateExt>
<CleanFile Condition=" '$(CleanFile)' == '' ">$(MSBuildProjectFile).FileList.txt</CleanFile>
<BindContentsFilePrefix Condition=" '$(BindContentsFilePrefix)' == '' ">$(MSBuildProjectFile).BindContentsFileList</BindContentsFilePrefix>
<BindContentsFileExtension Condition=" '$(BindContentsFileExtension)' == '' ">.txt</BindContentsFileExtension>
<BindOutputsFilePrefix Condition=" '$(BindOutputsFilePrefix)' == '' ">$(MSBuildProjectFile).BindOutputsFileList</BindOutputsFilePrefix>
<BindOutputsFileExtension Condition=" '$(BindOutputsFileExtension)' == '' ">.txt</BindOutputsFileExtension>
<BindBuiltOutputsFilePrefix Condition=" '$(BindBuiltOutputsFilePrefix)' == '' ">$(MSBuildProjectFile).BindBuiltOutputsFileList</BindBuiltOutputsFilePrefix>
<BindBuiltOutputsFileExtension Condition=" '$(BindBuiltOutputsFileExtension)' == '' ">.txt</BindBuiltOutputsFileExtension>
<SignedFile Condition=" '$(SignedFile)' == '' ">$(MSBuildProjectFile).Signed.txt</SignedFile>
</PropertyGroup>
<PropertyGroup Condition=" $(IntermediateOutputPath) == '' ">
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<IntermediateOutputPath Condition="!HasTrailingSlash('$(IntermediateOutputPath)')">$(IntermediateOutputPath)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<CabinetCachePath Condition=" '$(CabinetCachePath)'=='' and '$(ReuseCabinetCache)'=='true' ">$(IntermediateOutputPath)cabcache\</CabinetCachePath>
</PropertyGroup>
<ItemGroup>
<IntermediateAssembly Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)"/>
<FinalDocFile Include="@(DocFileItem->'$(OutDir)%(Filename)%(Extension)')"/>
</ItemGroup>
<PropertyGroup>
<WixToolPath Condition=" '$(WixToolPath)' == ''">$(WixInstallPath)</WixToolPath>
<WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixToolPath)</WixExtDir>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
IDE Macro Property Declarations
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
IDE Macros available from both integrated builds and from command line builds.
The following properties are 'macros' that are available via IDE for pre and post build steps.
All of them should be added to WixBuildMacroCollection to ensure that they are shown in the UI.
-->
<PropertyGroup>
<TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'PatchCreation' ">.pcp</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt>
<TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt>
</PropertyGroup>
<PropertyGroup>
<!-- Example, bin\Debug\ -->
<OutDir Condition=" '$(OutDir)' == '' ">$(OutputPath)</OutDir>
<!-- Ensure OutDir has a trailing slash, so it can be concatenated -->
<OutDir Condition=" '$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)') ">$(OutDir)\</OutDir>
<!-- Default pdb output path to the output directory -->
<PdbOutputPath Condition=" '$(PdbOutputPath)'=='' ">$(OutDir)</PdbOutputPath>
<PdbOutputPath Condition=" '$(PdbOutputPath)' != '' and !HasTrailingSlash('$(PdbOutputPath)') ">$(PdbOutputPath)\</PdbOutputPath>
<!-- Example, MySetup -->
<ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
<!-- Example, MySetup.wixproj -->
<ProjectFileName Condition=" '$(ProjectFileName)' == '' ">$(MSBuildProjectFile)</ProjectFileName>
<!-- Example, .wixproj -->
<ProjectExt Condition=" '$(ProjectExt)' == '' ">$(MSBuildProjectExtension)</ProjectExt>
<!-- Example, c:\MyProjects\MySetup\ -->
<ProjectDir Condition=" '$(ProjectDir)' == '' ">$(MSBuildProjectDirectory)\</ProjectDir>
<!-- Example, c:\MyProjects\MySetup\MySetup.msi -->
<ProjectPath Condition=" '$(ProjectPath)' == '' ">$(ProjectDir)$(ProjectFileName)</ProjectPath>
<!-- Example, .wixpdb -->
<TargetPdbExt Condition=" '$(TargetPdbExt)' == '' ">.wixpdb</TargetPdbExt>
<!-- Example, MySetup -->
<TargetName Condition=" '$(TargetName)' == '' ">$(OutputName)</TargetName>
<!-- Example, MySetup.msi -->
<TargetFileName Condition=" '$(TargetFileName)' == '' ">$(TargetName)$(TargetExt)</TargetFileName>
<!-- Example, MySetup.wixpdb" -->
<TargetPdbName Condition=" '$(TargetPdbName)' == '' ">$(TargetName)$(TargetPdbExt)</TargetPdbName>
<!-- Example, Debug -->
<ConfigurationName Condition=" '$(ConfigurationName)' == '' ">$(Configuration)</ConfigurationName>
<!-- Example, AnyCPU -->
<PlatformName Condition=" '$(PlatformName)' == '' ">$(Platform)</PlatformName>
</PropertyGroup>
<ItemGroup>
<!-- Create the output path as an item so that we can use %(FullPath) on it. -->
<_OutputPathItem Include="$(OutDir)" />
<_IntermediateOutputPathItem Include="$(IntermediateOutputPath)" />
</ItemGroup>
<PropertyGroup>
<!-- Example, c:\MyProjects\MySetup\bin\debug\ -->
<!--
Condition intentionally omitted on this one, because it causes problems
when we pick up the value of an environment variable named TargetDir
-->
<TargetDir Condition="'$(OutDir)' != ''">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(OutDir)`))`))</TargetDir>
<TargetPdbDir Condition=" '$(PdbOutputPath)'!='' ">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(PdbOutputPath)`))`))</TargetPdbDir>
<!-- Example, C:\MyProjects\MySetup\bin\debug\MySetup.msi -->
<TargetPath Condition=" '$(TargetPath)' == '' ">$(TargetDir)$(TargetFileName)</TargetPath>
<TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetPdbDir)$(TargetPdbName)</TargetPdbPath>
</PropertyGroup>
<!--
Set the SignTargetPath item directly when output is a Bundle. The AssignCultures target
sets SignTargetPath item for other output types based on the cultures provided.
-->
<ItemGroup>
<SignTargetPath Include="$(TargetPath)" Condition=" '$(OutputType)' == 'Bundle' AND '$(SignOutput)' == 'true' AND '$(SuppressLayout)' != 'true' " />
</ItemGroup>
<!--
IDE Macros available only from integrated builds. The following properties are 'macros' that are
available via IDE for pre and post build steps. However, they are not defined when directly
building a project from the command line, only when building a solution.
-->
<PropertyGroup>
<DevEnvDir Condition=" '$(DevEnvDir)' == '' ">*Undefined if not building from within Visual Studio*</DevEnvDir>
<!-- Example, MySolution -->
<SolutionName Condition=" '$(SolutionName)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionName>
<!-- Example, MySolution.sln -->
<SolutionFileName Condition=" '$(SolutionFileName)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionFileName>
<!-- Example, C:\MySolutions\MySolution\MySolution.sln -->
<SolutionPath Condition=" '$(SolutionPath)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionPath>
<!-- Example, C:\MySolutions\MySolution\ -->
<SolutionDir Condition=" '$(SolutionDir)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionDir>
<!-- Example, .sln -->
<SolutionExt Condition=" '$(SolutionExt)' == '' ">*Undefined if not building a solution or within Visual Studio*</SolutionExt>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Default Harvester, Compiler, Linker, and Librarian Property Declarations
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!-- If WixExtension was passed in via the command line, then convert it to an ItemGroup -->
<ItemGroup>
<WixExtension Include="$(WixExtension)" Condition=" '$(WixExtension)' != '' " />
</ItemGroup>
<!-- Default Harvester properties-->
<PropertyGroup>
<HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
<HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
<HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
<HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
<HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
<HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
<HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
<HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
<HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
<HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
</PropertyGroup>
<!-- Default HarvestProjects properties -->
<PropertyGroup>
<!-- Project harvesting is defaulted to off until it works more consistently. -->
<EnableProjectHarvesting Condition=" '$(EnableProjectHarvesting)'=='' ">false</EnableProjectHarvesting>
<HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
<HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
<HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
<HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
<HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
<HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
<HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
<HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
<HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
<HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
<HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
<HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
<HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
</PropertyGroup>
<!-- Default HarvestDirectory properties -->
<PropertyGroup>
<HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
<HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
<HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
<HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
<HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
<HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
<HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
<HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
<HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
<HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
<HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
</PropertyGroup>
<!-- Default HarvestFile properties -->
<PropertyGroup>
<HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
<HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
<HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
<HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
<HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
<HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
<HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
<HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
<HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
<HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
<HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
</PropertyGroup>
<!-- Defaut Compiler properties. -->
<PropertyGroup>
<CompilerNoLogo Condition=" '$(CompilerNoLogo)' == '' ">$(NoLogo)</CompilerNoLogo>
<CompilerSuppressAllWarnings Condition=" '$(CompilerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</CompilerSuppressAllWarnings>
<CompilerSuppressSpecificWarnings Condition=" '$(CompilerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</CompilerSuppressSpecificWarnings>
<CompilerSuppressSchemaValidation Condition=" '$(CompilerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</CompilerSuppressSchemaValidation>
<CompilerTreatWarningsAsErrors Condition=" '$(CompilerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</CompilerTreatWarningsAsErrors>
<CompilerTreatSpecificWarningsAsErrors Condition=" '$(CompilerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</CompilerTreatSpecificWarningsAsErrors>
<CompilerVerboseOutput Condition=" '$(CompilerVerboseOutput)' == '' ">$(VerboseOutput)</CompilerVerboseOutput>
<InstallerPlatform Condition=" '$(InstallerPlatform)' == '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU' ">$(Platform)</InstallerPlatform>
</PropertyGroup>
<!-- Default Lib properties. -->
<PropertyGroup>
<LibNoLogo Condition=" '$(LibNoLogo)' == '' ">$(NoLogo)</LibNoLogo>
<LibBindFiles Condition=" '$(LibBindFiles)' == '' ">$(BindFiles)</LibBindFiles>
<LibPedantic Condition=" '$(LibPedantic)' == '' ">$(Pedantic)</LibPedantic>
<LibSuppressAllWarnings Condition=" '$(LibSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LibSuppressAllWarnings>
<LibSuppressSpecificWarnings Condition=" '$(LibSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LibSuppressSpecificWarnings>
<LibSuppressSchemaValidation Condition=" '$(LibSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LibSuppressSchemaValidation>
<LibSuppressIntermediateFileVersionMatching Condition=" '$(LibSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LibSuppressIntermediateFileVersionMatching>
<LibTreatWarningsAsErrors Condition=" '$(LibTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LibTreatWarningsAsErrors>
<LibTreatSpecificWarningsAsErrors Condition=" '$(LibTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LibTreatSpecificWarningsAsErrors>
<LibVerboseOutput Condition=" '$(LibVerboseOutput)' == '' ">$(VerboseOutput)</LibVerboseOutput>
</PropertyGroup>
<!-- Default Linker properties. -->
<PropertyGroup>
<LinkerNoLogo Condition=" '$(LinkerNoLogo)' == '' ">$(NoLogo)</LinkerNoLogo>
<LinkerBindFiles Condition=" '$(LinkerBindFiles)' == '' ">$(BindFiles)</LinkerBindFiles>
<LinkerPedantic Condition=" '$(LinkerPedantic)' == '' ">$(Pedantic)</LinkerPedantic>
<LinkerSuppressAllWarnings Condition=" '$(LinkerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LinkerSuppressAllWarnings>
<LinkerSuppressSpecificWarnings Condition=" '$(LinkerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
<LinkerSuppressSchemaValidation Condition=" '$(LinkerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LinkerSuppressSchemaValidation>
<LinkerSuppressIntermediateFileVersionMatching Condition=" '$(LinkerSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LinkerSuppressIntermediateFileVersionMatching>
<LinkerTreatWarningsAsErrors Condition=" '$(LinkerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LinkerTreatWarningsAsErrors>
<LinkerTreatSpecificWarningsAsErrors Condition=" '$(LinkerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LinkerTreatSpecificWarningsAsErrors>
<LinkerVerboseOutput Condition=" '$(LinkerVerboseOutput)' == '' ">$(VerboseOutput)</LinkerVerboseOutput>
</PropertyGroup>
<!-- If BindInputPaths (or LinkerBindInputPaths) was passed in via the command line, then convert it to an ItemGroup -->
<ItemGroup>
<BindInputPaths Include="$(BindInputPaths)" Condition=" '$(BindInputPaths)' != '' " />
<LinkerBindInputPaths Include="$(LinkerBindInputPaths)" Condition=" '$(LinkerBindInputPaths)' != '' " />
</ItemGroup>
<!-- Default Lit and Light "properties" -->
<ItemGroup>
<LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="@(BindInputPaths)" />
<LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="$(LinkerBaseInputPaths)" />
<LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="$(BaseInputPaths)" />
</ItemGroup>
<!-- Default Inscribe properties. -->
<PropertyGroup>
<InscribeNoLogo Condition=" '$(InscribeNoLogo)' == '' ">$(NoLogo)</InscribeNoLogo>
<InscribeSuppressAllWarnings Condition=" '$(InscribeSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</InscribeSuppressAllWarnings>
<InscribeSuppressSpecificWarnings Condition=" '$(InscribeSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</InscribeSuppressSpecificWarnings>
<InscribeTreatWarningsAsErrors Condition=" '$(InscribeTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</InscribeTreatWarningsAsErrors>
<InscribeTreatSpecificWarningsAsErrors Condition=" '$(InscribeTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</InscribeTreatSpecificWarningsAsErrors>
<InscribeVerboseOutput Condition=" '$(InscribeVerboseOutput)' == '' ">$(VerboseOutput)</InscribeVerboseOutput>
</PropertyGroup>
<PropertyGroup>
<ProjectDefineConstants>
Configuration=$(ConfigurationName);
OutDir=$(OutDir);
Platform=$(PlatformName);
ProjectDir=$(ProjectDir);
ProjectExt=$(ProjectExt);
ProjectFileName=$(ProjectFileName);
ProjectName=$(ProjectName);
ProjectPath=$(ProjectPath);
TargetDir=$(TargetDir);
TargetExt=$(TargetExt);
TargetFileName=$(TargetFileName);
TargetName=$(TargetName);
TargetPath=$(TargetPath);
</ProjectDefineConstants>
</PropertyGroup>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Initial Targets
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
============================================================
_CheckForInvalidConfigurationAndPlatform
This target checks for errors in statically defined properties.
It always gets executed before any other target.
============================================================
-->
<Target
Name="_CheckForInvalidConfigurationAndPlatform">
<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)'"/>
<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)'"/>
<Message Text="Configuration=$(Configuration)" Importance="Low" />
<Message Text="Platform=$(Platform)" Importance="Low" />
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
<Error Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')" Text="The OutDir property must end with a trailing slash." />
<Error Condition="'$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')" Text="The BaseIntermediateOutputPath must end with a trailing slash." />
<Error Condition="'$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')" Text="The IntermediateOutputPath must end with a trailing slash." />
</Target>
<!--
==================================================================================================
_CheckRequiredProperties
Checks properties that must be set in the main project file or on the command line before
using this .TARGETS file.
[IN]
$(OutputName) - The name of the MSI/MSM/wixlib to build (without the extension)
$(OutputType) - Possible values are 'package', 'PatchCreation', 'module', 'library', 'bundle'
==================================================================================================
-->
<PropertyGroup>
<_PleaseSetThisInProjectFile>Please set this in the project file before the <Import> of the wix.targets file.</_PleaseSetThisInProjectFile>
<_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>
</PropertyGroup>
<Target Name="_CheckRequiredProperties">
<Error
Code="WIXTARGETS100"
Condition=" '$(OutputName)' == '' "
Text="The OutputName property is not set in project "$(MSBuildProjectFile)". The OutputName defines the name of the output without a file extension. $(_PleaseSetThisInProjectFile)" />
<Warning
Code="WIXTARGETS101"
Condition=" '$(_OriginalOutputType)' == '' "
Text="The OutputType property is not set in project "$(MSBuildProjectFile)". Defaulting to 'Package'. $(_OutputTypeDescription)" />
<Error
Code="WIXTARGETS102"
Condition=" '$(OutputType)' != 'Package' and '$(OutputType)' != 'PatchCreation' and '$(OutputType)' != 'Module' and '$(OutputType)' != 'Library' and '$(OutputType)' != 'Bundle' "
Text="The OutputType property '$(OutputType)' is not valid in project "$(MSBuildProjectFile)". $(_OutputTypeDescription)" />
<!-- Although we try to ensure a trailing slash, it's possible to circumvent this if the property is set on the command line -->
<Error
Code="WIXTARGETS103"
Condition="'$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')"
Text="The OutDir property must end with a trailing slash." />
<Message
Condition=" '$(BaseInputPaths)' != '' "
Text="Deprecated: Use BindInputPaths instead of BaseInputPaths." />
<Message
Condition=" '$(LinkerBaseInputPaths)' != '' "
Text="Deprecated: Use LinkerBindInputPaths instead of LinkerBaseInputPaths." />
</Target>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Build Targets
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
==================================================================================================
Build
The main build entry point.
==================================================================================================
-->
<PropertyGroup>
<BuildDependsOn>
BeforeBuild;
CoreBuild;
AfterBuild
</BuildDependsOn>
</PropertyGroup>
<Target
Name="Build"
DependsOnTargets="$(BuildDependsOn)"
Outputs="$(TargetPath)">
</Target>
<!--
==================================================================================================
BeforeBuild
Redefine this target in your project in order to run tasks just before Build.
==================================================================================================
-->
<Target Name="BeforeBuild" />
<!--
==================================================================================================
AfterBuild
Redefine this target in your project in order to run tasks just after Build.
==================================================================================================
-->
<Target Name="AfterBuild" />
<!--
==================================================================================================
CoreBuild
The core build step calls each of the build targets.
==================================================================================================
-->
<PropertyGroup>
<CoreBuildDependsOn>
BuildOnlySettings;
PrepareForBuild;
PreBuildEvent;
ResolveReferences;
AddCompilerDefineConstants;
CompileAndLink;
Signing;
GetTargetPath;
IncrementalClean;
PostBuildEvent
</CoreBuildDependsOn>
</PropertyGroup>
<Target
Name="CoreBuild"
DependsOnTargets="$(CoreBuildDependsOn)">
<OnError
ExecuteTargets="_TimeStampAfterCompileAndLink;PostBuildEvent"
Condition=" '$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnOutputUpdated' " />
<OnError ExecuteTargets="_CleanRecordFileWrites" />
</Target>
<!--
==================================================================================================
Rebuild
Delete all intermediate and final build outputs, and then build the project from scratch.
==================================================================================================
-->
<PropertyGroup>
<RebuildDependsOn>
BeforeRebuild;
Clean;
$(MSBuildProjectDefaultTargets);
AfterRebuild;
</RebuildDependsOn>
<RebuildDependsOn Condition=" '$(MSBuildProjectDefaultTargets)' == 'Rebuild' ">
BeforeRebuild;
Clean;
Build;
AfterRebuild;
</RebuildDependsOn>
</PropertyGroup>
<Target
Name="Rebuild"
DependsOnTargets="$(RebuildDependsOn)"
Outputs="$(TargetPath)" />
<!--
==================================================================================================
BeforeRebuild
Redefine this target in your project in order to run tasks just before Rebuild.
==================================================================================================
-->
<Target Name="BeforeRebuild" />
<!--
==================================================================================================
AfterRebuild
Redefine this target in your project in order to run tasks just after Rebuild.
==================================================================================================
-->
<Target Name="AfterRebuild" />
<!--
==================================================================================================
BuildOnlySettings
This target is called only when doing a real build. It is not called during project load.
==================================================================================================
-->
<PropertyGroup>
<BuildingProject>false</BuildingProject>
</PropertyGroup>
<Target Name="BuildOnlySettings">
<CreateProperty Value="true">
<Output TaskParameter="Value" PropertyName="BuildingProject" />
</CreateProperty>
</Target>
<!--
==================================================================================================
PrepareForBuild
Prepare the prerequisites for building.
==================================================================================================
-->
<PropertyGroup>
<PrepareForBuildDependsOn></PrepareForBuildDependsOn>
</PropertyGroup>
<Target
Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)">
<!-- Create the directories for intermediate and final build products. -->
<MakeDir Directories="$(IntermediateOutputPath);$(OutDir)" />
</Target>
<!--
==================================================================================================
ResolveWixExtensionReferences
Resolves WiX extension references to full paths. Any properties you use
to resolve paths to extensions must be defined before importing this
file or the extensions will be automatically resolved to $(WixExtDir).
[IN]
@(WixExtension) - WixExtension item group
[OUT]
@(_ResolvedWixExtensionPaths) - Item group with full paths to extensions
==================================================================================================
-->
<PropertyGroup>
<ResolveWixExtensionReferencesDependsOn>
PrepareForBuild
</ResolveWixExtensionReferencesDependsOn>
</PropertyGroup>
<Target
Name="ResolveWixExtensionReferences"
DependsOnTargets="$(ResolveWixExtensionReferencesDependsOn)"
Condition=" '@(WixExtension)' != ''">
<!--
The WixExtensionSearchPaths property is set to find assemblies in the following order:
(1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
(2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
(3) Treat the reference's Include as if it were a real file name.
(4) Path specified by the WixExtDir property.
-->
<CreateProperty Condition=" '$(WixExtensionSearchPaths)' == '' " Value="
$(ReferencePaths);
{HintPathFromItem};
{RawFileName};
$(WixExtDir)
">
<Output TaskParameter="Value" PropertyName="WixExtensionSearchPaths" />
</CreateProperty>
<ResolveWixReferences
WixReferences="@(WixExtension)"
SearchPaths="$(WixExtensionSearchPaths)"
SearchFilenameExtensions=".dll">
<Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixExtensionPaths" />
</ResolveWixReferences>
<!-- Remove duplicate extension items that would cause build errors -->
<RemoveDuplicates Inputs="@(_AllResolvedWixExtensionPaths)">
<Output TaskParameter="Filtered" ItemName="_ResolvedWixExtensionPaths" />
</RemoveDuplicates>
</Target>
<!--
==================================================================================================
PreBuildEvent
Run the pre-build event if there is one.
==================================================================================================
-->
<PropertyGroup>
<PreBuildEventDependsOn>GetTargetPath</PreBuildEventDependsOn>
</PropertyGroup>
<Target
Name="PreBuildEvent"
DependsOnTargets="$(PreBuildEventDependsOn)"
Condition=" '$(PreBuildEvent)' != '' ">
<ReplaceString
Text="$(PreBuildEvent)"
OldValue="!(TargetPath)"
NewValue="$(TargetPath)">
<Output TaskParameter="Text" PropertyName="ExpandedPreBuildEvent" />
</ReplaceString>
<ReplaceString
Text="$(ExpandedPreBuildEvent)"
OldValue="!(TargetPdbPath)"
NewValue="$(TargetPdbPath)">
<Output TaskParameter="Text" PropertyName="ExpandedPreBuildEvent" />
</ReplaceString>
<Exec WorkingDirectory="$(OutDir)" Command="$(ExpandedPreBuildEvent)" />
</Target>
<!--
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Resolve References Targets
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
-->
<!--
==================================================================================================
ResolveReferences
==================================================================================================
-->
<PropertyGroup>
<ResolveReferencesDependsOn>
BeforeResolveReferences;
AssignProjectConfiguration;
ResolveProjectReferences;
ResolveWixLibraryReferences;
ResolveWixExtensionReferences;
AfterResolveReferences
</ResolveReferencesDependsOn>
</PropertyGroup>
<Target
Name="ResolveReferences"
DependsOnTargets="$(ResolveReferencesDependsOn)" />
<!--
==================================================================================================
BeforeResolveReferences
Redefine this target in your project in order to run tasks just before ResolveReferences.
==================================================================================================
-->
<Target Name="BeforeResolveReferences" />
<!--
==================================================================================================
AfterResolveReferences
Redefine this target in your project in order to run tasks just after ResolveReferences.
==================================================================================================
-->
<Target Name="AfterResolveReferences" />
<!--
==================================================================================================
AssignProjectConfiguration
Assign the appropriate configuration to each project in the list of project references passed in.
[IN]
@(ProjectReference) - the list of all project references
[OUT]
@(_ProjectReferenceWithConfiguration) - the list of project references (MSBuild and potentially VSIP projects)
==================================================================================================
-->
<Target
Name="AssignProjectConfiguration"
Condition=" '@(ProjectReference)' != '' ">
<!-- Assign a project configuration to each project reference if we're building a solution file. -->
<AssignProjectConfiguration
ProjectReferences="@(ProjectReference)"
CurrentProjectConfiguration="$(Configuration)"
CurrentProjectPlatform="$(Platform)"
SolutionConfigurationContents="$(CurrentSolutionConfigurationContents)">
<Output TaskParameter="AssignedProjects" ItemName="_ProjectReferenceWithConfiguration" />
<Output TaskParameter="UnassignedProjects" ItemName="_ProjectReferenceWithConfiguration"/>
</AssignProjectConfiguration>
<!-- Add in the source project path so that we can have access to it after resolving the output. -->
<ItemGroup>
<_ProjectReferenceWithConfiguration>
<MSBuildSourceProjectFileFullPath>%(FullPath)</MSBuildSourceProjectFileFullPath>
</_ProjectReferenceWithConfiguration>
</ItemGroup>
</Target>
<!--
==================================================================================================
_SplitProjectReferencesByFileExistence
Split referenced projects into two lists: those that exist on disk and those that don't.
[IN]
@(NonVCProjectReference) - the list of non-VC project references (MSBuild and potentially VSIP projects)
[OUT]
@(_MSBuildProjectReferenceExistent) - the list of non-VC project references that exist on disk
@(_MSBuildProjectReferenceNonexistent) - the list of non-VC project references that don't exist on disk
==================================================================================================
-->
<Target
Name="_SplitProjectReferencesByFileExistence">
<!--
Use this task for matching projects with pre-resolved project outputs set by the IDE if building
inside the IDE. The IDE only includes non-MSBuild projects in the output list. We'll use MSBuild
to resolve MSBuild projects. This task will resolve VSIP (3rd party) project references and
create a new item list with only project references to projects in the MSBuild format.
-->
<ResolveNonMSBuildProjectOutput
ProjectReferences="@(_ProjectReferenceWithConfiguration)"
PreresolvedProjectOutputs="$(VSIDEResolvedNonMSBuildProjectOutputs)"
Condition=" '$(BuildingInsideVisualStudio)' == 'true' and '@(_ProjectReferenceWithConfiguration)'!=''">
<Output TaskParameter="ResolvedOutputPaths" ItemName="_ResolvedProjectReferencePaths" />
<Output TaskParameter="UnresolvedProjectReferences" ItemName="_MSBuildProjectReference" />
</ResolveNonMSBuildProjectOutput>
<!--
If building from the command line, simply copy the _ProjectReferenceWithConfiguration item list to
_MSBuildProjectReference, since we have to assume all non-VC projects are in the MSBuild format.
We have no way of building VSIP (3rd party) projects from the command line.
-->
<ItemGroup>
<_MSBuildProjectReference Include="@(_ProjectReferenceWithConfiguration)" Condition="'$(BuildingInsideVisualStudio)'!='true' and '@(_ProjectReferenceWithConfiguration)'!=''"/>
</ItemGroup>
<!-- Break the project list into two lists: those that exist on disk and those that don't. -->
<ItemGroup>
<_MSBuildProjectReferenceExistent Include="@(_MSBuildProjectReference)" Condition="Exists('%(Identity)')"/>
<_MSBuildProjectReferenceNonexistent Include="@(_MSBuildProjectReference)" Condition="!Exists('%(Identity)')"/>
</ItemGroup>
</Target>
<!--
================================================================================================
ResolveProjectReferences
Builds all of the referenced projects to get their outputs.
[IN]
@(NonVCProjectReference) - The list of non-VC project references.
[OUT]
@(_ProjectReferenceWithConfiguration) - The list of non-VC project references.
@(WixLibProjects) - Paths to any .wixlibs that were built by referenced projects.
================================================================================================
-->
<Target
Name="ResolveProjectReferences"
DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence"
Condition=" '@(_ProjectReferenceWithConfiguration)' != '' ">
<!-- Issue a warning for each non-existent project. -->
<Warning
Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
Condition=" '@(_MSBuildProjectReferenceNonexistent)' != '' " />
<!--
When building this project from the IDE or when building a .sln from the command line or
when only building .wixlib project references, gather the referenced build outputs. The
code that builds the .sln will already have built the project, so there's no need to do
it again here and when building only .wixlib project references we'll use the results to
determine which projects to build.
The ContinueOnError setting is here so that, during project load, as much information as
possible will be passed to the compilers.
-->
<MSBuild
Projects="@(_MSBuildProjectReferenceExistent)"
Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);%(_MSBuildProjectReferenceExistent.SetPlatform)"
Condition="('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '@(_MSBuildProjectReferenceExistent)' != '' "
ContinueOnError="!$(BuildingProject)">
<Output TaskParameter="TargetOutputs" ItemName="_GatheredProjectReferencePaths" />
</MSBuild>
<!--
Determine which project references should be built. Note: we will not build any project references
if building in the IDE because it builds project references directly.
If BuildProjectReferences is 'true' (the default) then take all MSBuild project references that exist
on disk and add them to the list of things to build. This is the easy case.