aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Sdk
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-06-26 01:09:40 -0700
committerRob Mensching <rob@firegiant.com>2020-06-26 10:25:44 -0700
commit5f89a76d42dd9d132f4454e196e4f26fd65333ee (patch)
treef1dbf5c265cc4d777715be7aac4d1d783a4b5a7c /src/WixToolset.Sdk
parent448c960dac5dc9b755b92f7d4b130dc998d64c70 (diff)
downloadwix-5f89a76d42dd9d132f4454e196e4f26fd65333ee.tar.gz
wix-5f89a76d42dd9d132f4454e196e4f26fd65333ee.tar.bz2
wix-5f89a76d42dd9d132f4454e196e4f26fd65333ee.zip
Rename WixToolset.Msbuild to WixToolset.Sdk
Diffstat (limited to 'src/WixToolset.Sdk')
-rw-r--r--src/WixToolset.Sdk/Sdk/Sdk.props23
-rw-r--r--src/WixToolset.Sdk/Sdk/Sdk.targets15
-rw-r--r--src/WixToolset.Sdk/WixToolset.Sdk.csproj38
-rw-r--r--src/WixToolset.Sdk/WixToolset.Sdk.nuspec18
-rw-r--r--src/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject5
-rw-r--r--src/WixToolset.Sdk/build/WixToolset.Sdk.props8
-rw-r--r--src/WixToolset.Sdk/tools/wix.ca.targets123
-rw-r--r--src/WixToolset.Sdk/tools/wix.harvest.targets512
-rw-r--r--src/WixToolset.Sdk/tools/wix.signing.targets370
-rw-r--r--src/WixToolset.Sdk/tools/wix.targets1083
10 files changed, 2195 insertions, 0 deletions
diff --git a/src/WixToolset.Sdk/Sdk/Sdk.props b/src/WixToolset.Sdk/Sdk/Sdk.props
new file mode 100644
index 00000000..5080e393
--- /dev/null
+++ b/src/WixToolset.Sdk/Sdk/Sdk.props
@@ -0,0 +1,23 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
4 <PropertyGroup>
5 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
6 </PropertyGroup>
7
8 <PropertyGroup>
9 <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\wix.targets'))</WixTargetsPath>
10 </PropertyGroup>
11
12 <PropertyGroup>
13 <TargetFramework Condition=" '$(TargetFramework)' == '' ">netstandard2.0</TargetFramework>
14 <EnableDefaultItems Condition=" '$(EnableDefaultItems)' == '' ">true</EnableDefaultItems>
15 <EnableDefaultCompileItems Condition=" '$(EnableDefaultCompileItems)' == '' ">true</EnableDefaultCompileItems>
16 <EnableDefaultEmbeddedResourceItems Condition=" '$(EnableDefaultEmbeddedResourceItems)' == '' ">true</EnableDefaultEmbeddedResourceItems>
17 </PropertyGroup>
18
19 <ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' ">
20 <Compile Include="**/*.wxs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultCompileItems)' == 'true' " />
21 <EmbeddedResource Include="**/*.wxl" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultEmbeddedResourceItems)' == 'true' " />
22 </ItemGroup>
23</Project>
diff --git a/src/WixToolset.Sdk/Sdk/Sdk.targets b/src/WixToolset.Sdk/Sdk/Sdk.targets
new file mode 100644
index 00000000..e21cf5c6
--- /dev/null
+++ b/src/WixToolset.Sdk/Sdk/Sdk.targets
@@ -0,0 +1,15 @@
1<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
2
3<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
4 <PropertyGroup>
5 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
6 </PropertyGroup>
7
8 <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' and Exists('$(WixTargetsPath)')" />
9
10 <PropertyGroup>
11 <DefaultItemExcludes Condition=" '$(BaseOutputPath)' != '' ">$(DefaultItemExcludes);$(BaseOutputPath)**</DefaultItemExcludes>
12 <DefaultItemExcludes Condition=" '$(BaseIntermediateOutputPath)' != '' ">$(DefaultItemExcludes);$(BaseIntermediateOutputPath)**</DefaultItemExcludes>
13 <DefaultExcludesInProjectFolder>$(DefaultItemExcludesInProjectFolder);**/.*/**</DefaultExcludesInProjectFolder>
14 </PropertyGroup>
15</Project>
diff --git a/src/WixToolset.Sdk/WixToolset.Sdk.csproj b/src/WixToolset.Sdk/WixToolset.Sdk.csproj
new file mode 100644
index 00000000..32bd66c0
--- /dev/null
+++ b/src/WixToolset.Sdk/WixToolset.Sdk.csproj
@@ -0,0 +1,38 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp2.1</TargetFramework>
7 <IncludeBuildOutput>false</IncludeBuildOutput>
8 <Description>WiX Toolset MSBuild integration</Description>
9 <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
10 <NuspecBasePath>$(OutputPath)publish\WixToolset.Sdk\</NuspecBasePath>
11 <NuspecProperties>Id=$(MSBuildThisFileName);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description)</NuspecProperties>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <Content Include="build\$(MSBuildThisFileName).props" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="tools\wix.ca.targets" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="tools\wix.harvest.targets" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="tools\wix.signing.targets" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="tools\wix.targets" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="Sdk\Sdk.props" CopyToOutputDirectory="PreserveNewest" />
21 <Content Include="Sdk\Sdk.targets" CopyToOutputDirectory="PreserveNewest" />
22 </ItemGroup>
23
24 <ItemGroup>
25 <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="All" />
26 </ItemGroup>
27
28 <PropertyGroup>
29 <GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);SetNuspecVersion</GenerateNuspecDependsOn>
30 </PropertyGroup>
31 <Target Name="SetNuspecVersion">
32 <Error Text="Cannot pack $(MSBuildThisFileName) until all projects are published to: '$(NuspecBasePath)'. Run appveyor.cmd to publish projects properly." Condition=" !Exists('$(NuspecBasePath)') " />
33
34 <PropertyGroup>
35 <NuspecProperties>$(NuspecProperties);Version=$(Version);ProjectFolder=$(MSBuildThisFileDirectory)</NuspecProperties>
36 </PropertyGroup>
37 </Target>
38</Project>
diff --git a/src/WixToolset.Sdk/WixToolset.Sdk.nuspec b/src/WixToolset.Sdk/WixToolset.Sdk.nuspec
new file mode 100644
index 00000000..591b63a6
--- /dev/null
+++ b/src/WixToolset.Sdk/WixToolset.Sdk.nuspec
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8"?>
2<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3 <metadata>
4 <id>$id$</id>
5 <version>$version$</version>
6 <authors>$authors$</authors>
7 <owners>$authors$</owners>
8 <requireLicenseAcceptance>false</requireLicenseAcceptance>
9 <description>$description$</description>
10 <copyright>$copyright$</copyright>
11 </metadata>
12
13 <files>
14 <file src="build\**\*" target="build" />
15 <file src="Sdk\**\*" target="Sdk" />
16 <file src="tools\**\*" target="tools" />
17 </files>
18</package>
diff --git a/src/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject b/src/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/WixToolset.Sdk/build/WixToolset.Sdk.props b/src/WixToolset.Sdk/build/WixToolset.Sdk.props
new file mode 100644
index 00000000..b453361b
--- /dev/null
+++ b/src/WixToolset.Sdk/build/WixToolset.Sdk.props
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
5 <PropertyGroup>
6 <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\wix.targets'))</WixTargetsPath>
7 </PropertyGroup>
8</Project>
diff --git a/src/WixToolset.Sdk/tools/wix.ca.targets b/src/WixToolset.Sdk/tools/wix.ca.targets
new file mode 100644
index 00000000..4578c2d8
--- /dev/null
+++ b/src/WixToolset.Sdk/tools/wix.ca.targets
@@ -0,0 +1,123 @@
1<?xml version="1.0" encoding="utf-8" ?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6
7 <Import Project="$(CustomBeforeWixCATargets)" Condition=" '$(CustomBeforeWixCATargets)' != '' and Exists('$(CustomBeforeWixCATargets)')" />
8
9 <PropertyGroup>
10 <WixCATargetsImported>true</WixCATargetsImported>
11
12 <TargetCAFileName Condition=" '$(TargetCAFileName)' == '' ">$(TargetName).CA$(TargetExt)</TargetCAFileName>
13
14 <WixSdkPath Condition=" '$(WixSdkPath)' == '' ">$(MSBuildThisFileDirectory)</WixSdkPath>
15 <WixSdkX86Path Condition=" '$(WixSdkX86Path)' == '' ">$(WixSdkPath)x86\</WixSdkX86Path>
16 <WixSdkX64Path Condition=" '$(WixSdkX64Path)' == '' ">$(WixSdkPath)x64\</WixSdkX64Path>
17
18 <MakeSfxCA Condition=" '$(MakeSfxCA)' == '' ">$(WixSdkPath)MakeSfxCA.exe</MakeSfxCA>
19 <SfxCADll Condition=" '$(SfxCADll)' == '' and '$(Platform)' == 'x64' ">$(WixSdkX64Path)SfxCA.dll</SfxCADll>
20 <SfxCADll Condition=" '$(SfxCADll)' == '' ">$(WixSdkX86Path)SfxCA.dll</SfxCADll>
21 </PropertyGroup>
22
23 <!--
24 ==================================================================================================
25 PackCustomAction
26
27 Creates an MSI managed custom action package that includes the custom action assembly,
28 local assembly dependencies, and project content files.
29
30 [IN]
31 @(IntermediateAssembly) - Managed custom action assembly.
32 @(Content) - Project items of type Content will be included in the package.
33 $(CustomActionContents) - Optional space-delimited list of additional files to include.
34
35 [OUT]
36 $(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub.
37 ==================================================================================================
38 -->
39 <Target Name="PackCustomAction"
40 Inputs="@(IntermediateAssembly);@(Content);$(CustomActionContents)"
41 Outputs="$(IntermediateOutputPath)$(TargetCAFileName)">
42
43 <!-- Find all referenced items marked CopyLocal, but exclude non-binary files. -->
44 <ItemGroup>
45 <CustomActionReferenceContents Include="@(ReferenceCopyLocalPaths)"
46 Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " />
47 <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)"
48 Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " />
49
50 <!-- include PDBs for Debug only -->
51 <CustomActionReferenceContents Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')"
52 Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' " />
53 <CustomActionReferenceContents Include="@(ReferenceCopyLocalPaths)"
54 Condition=" '%(Extension)' == '.pdb' and '$(Configuration)' == 'Debug' " />
55 <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)"
56 Condition=" '%(Extension)' == '.pdb' and '$(Configuration)' == 'Debug' " />
57 </ItemGroup>
58
59 <!--
60 Items to include in the CA package:
61 - Reference assemblies marked CopyLocal
62 - Project items of type Content
63 - Additional items in the CustomActionContents property
64 -->
65 <PropertyGroup>
66 <CustomActionContents>@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)</CustomActionContents>
67 </PropertyGroup>
68
69 <ItemGroup>
70 <IntermediateCAAssembly Include="@(IntermediateAssembly->'%(FullPath)')" />
71 <IntermediateCAPackage Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')" />
72 </ItemGroup>
73
74 <!-- Run the MakeSfxCA.exe CA packaging tool. -->
75 <Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "$(CustomActionContents)"'
76 WorkingDirectory="$(ProjectDir)" />
77
78 <!-- Add modules to be copied to output dir. -->
79 <ItemGroup>
80 <AddModules Include="@(IntermediateCAPackage)" />
81 </ItemGroup>
82 </Target>
83
84 <!--
85 ==================================================================================================
86 CleanCustomAction
87
88 Cleans the .CA.dll binary created by the PackCustomAction target.
89
90 ==================================================================================================
91 -->
92 <Target Name="CleanCustomAction">
93 <Delete Files="$(IntermediateOutputPath)$(TargetCAFileName)"
94 TreatErrorsAsWarnings="true" />
95 </Target>
96
97 <!--
98 ==================================================================================================
99 AfterCompile (redefinition)
100
101 Calls the PackCustomAction target after compiling.
102 Overrides the empty AfterCompile target from Microsoft.Common.targets.
103
104 ==================================================================================================
105 -->
106 <Target Name="AfterCompile"
107 DependsOnTargets="PackCustomAction" />
108
109 <!--
110 ==================================================================================================
111 BeforeClean (redefinition)
112
113 Calls the CleanCustomAction target before cleaning.
114 Overrides the empty AfterCompile target from Microsoft.Common.targets.
115
116 ==================================================================================================
117 -->
118 <Target Name="BeforeClean"
119 DependsOnTargets="CleanCustomAction" />
120
121 <Import Project="$(CustomAfterWixCATargets)" Condition=" '$(CustomAfterWixCATargets)' != '' and Exists('$(CustomAfterWixCATargets)')" />
122
123</Project>
diff --git a/src/WixToolset.Sdk/tools/wix.harvest.targets b/src/WixToolset.Sdk/tools/wix.harvest.targets
new file mode 100644
index 00000000..dea44469
--- /dev/null
+++ b/src/WixToolset.Sdk/tools/wix.harvest.targets
@@ -0,0 +1,512 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <!-- These properties can be overridden to support non-default installations. -->
7 <PropertyGroup>
8 <HeatToolDir Condition=" '$(HeatToolDir)' == '' ">$(WixToolDir)</HeatToolDir>
9 </PropertyGroup>
10
11 <!-- These tasks are extensions for harvesting WiX source code from other sources. -->
12 <UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
13 <UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
14 <UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
15
16 <UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
17 <UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
18
19 <!-- Default Harvester properties-->
20 <PropertyGroup>
21 <HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
22 <HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
23 <HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
24 <HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
25 <HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
26 <HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
27 <HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
28 <HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
29 <HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
30 <HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
31 </PropertyGroup>
32
33 <!-- Default HarvestProjects properties -->
34 <PropertyGroup>
35 <!-- Project harvesting is defaulted to off until it works more consistently. -->
36 <EnableProjectHarvesting Condition=" '$(EnableProjectHarvesting)'=='' ">false</EnableProjectHarvesting>
37
38 <HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
39 <HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
40 <HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
41 <HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
42 <HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
43 <HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
44 <HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
45 <HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
46 <HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
47 <HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
48 <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
49 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
50 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
51 </PropertyGroup>
52
53 <!-- Default HarvestDirectory properties -->
54 <PropertyGroup>
55 <HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
56 <HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
57 <HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
58 <HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
59 <HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
60 <HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
61 <HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
62 <HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
63 <HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
64 <HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
65 <HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
66 </PropertyGroup>
67
68 <!-- Default HarvestFile properties -->
69 <PropertyGroup>
70 <HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
71 <HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
72 <HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
73 <HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
74 <HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
75 <HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
76 <HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
77 <HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
78 <HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
79 <HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
80 <HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
81 </PropertyGroup>
82
83 <!--
84 ==================================================================================================
85 Harvest
86 ==================================================================================================
87 -->
88 <PropertyGroup>
89 <HarvestDependsOn>
90 ConvertReferences;
91 ConvertBundleReferences;
92 HarvestProjects;
93 HarvestDirectory;
94 HarvestFile;
95 GenerateCode;
96 </HarvestDependsOn>
97 </PropertyGroup>
98 <Target
99 Name="Harvest"
100 DependsOnTargets="$(HarvestDependsOn)" />
101
102 <!--
103 ==================================================================================================
104 GenerateCode
105 ==================================================================================================
106 -->
107 <PropertyGroup>
108 <GenerateCodeDependsOn>
109 RefreshGeneratedFile;
110 RefreshBundleGeneratedFile
111 </GenerateCodeDependsOn>
112 </PropertyGroup>
113 <Target
114 Name="GenerateCode"
115 DependsOnTargets="$(GenerateCodeDependsOn)" />
116
117 <!--
118 ================================================================================================
119 ConvertReferences
120
121 Converts project references to HeatProject items to auto generate authoring.
122 ================================================================================================
123 -->
124 <Target
125 Name="ConvertReferences"
126 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') ">
127
128 <ItemGroup>
129 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
130 <DirectoryIds>%(_MSBuildProjectReferenceExistent.RefTargetDir)</DirectoryIds>
131 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
132 <ProjectName>%(_MSBuildProjectReferenceExistent.Name)</ProjectName>
133 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
134 </_HeatProjectReference>
135 <HeatProject Include="@(_HeatProjectReference)" />
136 </ItemGroup>
137
138 <Error
139 Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
140 Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
141
142 <ItemGroup>
143 <!-- Unconditionally generate Compile items so they are always linked in. -->
144 <Compile Include="$(HarvestProjectsGeneratedFile)" />
145 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
146 </ItemGroup>
147
148 </Target>
149
150 <!--
151 ================================================================================================
152 ConvertBundleReferences
153
154 Converts project references in Bundle projects to HeatProject items to auto generate authoring.
155 ================================================================================================
156 -->
157 <Target
158 Name="ConvertBundleReferences"
159 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle') ">
160
161 <ItemGroup>
162 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
163 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
164 <GenerateType>payloadgroup</GenerateType>
165 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
166 </_HeatProjectReference>
167 <HeatProject Include="@(_HeatProjectReference)" />
168 </ItemGroup>
169
170 <Error
171 Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
172 Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
173
174 <ItemGroup>
175 <!-- Unconditionally generate Compile items so they are always linked in. -->
176 <Compile Include="$(HarvestProjectsGeneratedFile)" />
177 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
178 </ItemGroup>
179
180 </Target>
181
182 <!--
183 ================================================================================================
184 CombineHarvestProjects
185
186 Combines HeatProject and HarvestProject items together and ensures each has HeatOutput metadata.
187 ================================================================================================
188 -->
189 <Target
190 Name="CombineHarvestProjects"
191 Condition=" '@(HeatProject)' != '' or '@(HarvestProject)' != '' ">
192
193 <!-- Add default HeatOutputs for those without one specified -->
194 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' == '' "
195 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HeatProject.Filename).wxs">
196 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
197 </CreateItem>
198 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' == '' "
199 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HarvestProject.Filename).wxs">
200 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
201 </CreateItem>
202
203
204 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' != '' ">
205 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
206 </CreateItem>
207 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' != '' ">
208 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
209 </CreateItem>
210
211 </Target>
212
213 <!--
214 ================================================================================================
215 HarvestProjects
216
217 Harvests outputs of other MSBuild projects files using the VS project extension to heat.exe.
218
219 [IN]
220 @(HarvestProject)
221 @(HeatProject)
222 - The list of projects to harvest. HeatProject is provided for backward compatibility.
223 You should use HarvestProject instead.
224
225 %(HarvestProject.Transforms)
226 %(HeatProject.Transforms)
227 - XSL transforms to apply to the harvested WiX.
228
229 %(HarvestProject.ProjectOutputGroups)
230 %(HeatProjects.ProjectOutputGroups)
231 - The project output groups to harvest
232
233 [OUT]
234 %(HeatOutput)
235 - The generated .wxs files which are added to the @(Compile) item list.
236 ================================================================================================
237 -->
238 <ItemDefinitionGroup>
239 <HeatProject>
240 <Transforms>$(HarvestProjectsTransforms)</Transforms>
241 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
242 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
243 </HeatProject>
244 <HarvestProject>
245 <Transforms>$(HarvestProjectsTransforms)</Transforms>
246 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
247 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
248 </HarvestProject>
249 </ItemDefinitionGroup>
250
251 <PropertyGroup>
252 <HarvestProjectsDependsOn>CombineHarvestProjects</HarvestProjectsDependsOn>
253 </PropertyGroup>
254 <Target Name="HarvestProjects"
255 DependsOnTargets="$(HarvestProjectsDependsOn)"
256 Inputs="@(_AllHeatProjects);%(_AllHeatProjects.Transforms);$(MSBuildAllProjects);$(ProjectPath)"
257 Outputs="@(_AllHeatProjects -> '%(HeatOutput)')"
258 Condition=" $(EnableProjectHarvesting) and ('@(HeatProject)' != '' or '@(HarvestProject)' != '') ">
259
260 <HeatProject
261 NoLogo="true"
262 SuppressAllWarnings="$(HarvestProjectsSuppressAllWarnings)"
263 SuppressSpecificWarnings="$(HarvestProjectsSuppressSpecificWarnings)"
264 TreatWarningsAsErrors="$(HarvestProjectsTreatWarningsAsErrors)"
265 TreatSpecificWarningsAsErrors="$(HarvestProjectsTreatSpecificWarningsAsErrors)"
266 VerboseOutput="$(HarvestProjectsVerboseOutput)"
267 AutogenerateGuids="$(HarvestProjectsAutogenerateGuids)"
268 GenerateGuidsNow="$(HarvestProjectsGenerateGuidsNow)"
269 OutputFile="%(_AllHeatProjects.HeatOutput)"
270 SuppressFragments="$(HarvestProjectsSuppressFragments)"
271 SuppressUniqueIds="$(HarvestProjectsSuppressUniqueIds)"
272 Transforms="%(_AllHeatProjects.Transforms)"
273 Project="%(_AllHeatProjects.FullPath)"
274 ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)"
275 GenerateType="%(_AllHeatProjects.GenerateType)"
276 DirectoryIds="%(_AllHeatProjects.DirectoryIds)"
277 ProjectName="%(_AllHeatProjects.ProjectName)"
278 Configuration="%(_AllHeatProjects.Configuration)"
279 Platform="%(_AllHeatProjects.Platform)"
280 GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
281 AdditionalOptions="$(HarvestProjectsAdditionalOptions)"
282 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
283 ToolExe="$(HeatToolExe)"
284 ToolPath="$(HeatToolDir)">
285
286 <Output TaskParameter="OutputFile" ItemName="Compile" />
287 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
288
289 </HeatProject>
290
291 </Target>
292
293 <!--
294 ================================================================================================
295 HarvestDirectory
296
297 Harvests directories using heat.exe.
298
299 [IN]
300 @(HarvestDirectory) - The list of directories to harvest.
301 %(HarvestDirectory.Transforms) - XSL transforms to apply to the harvested WiX.
302 %(HarvestDirectory.ComponentGroupName) - The name of the ComponentGroup to create.
303 %(HarvestDirectory.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
304 %(HarvestDirectory.KeepEmptyDirectories) - Whether to create Directory entries for empty directories.
305 %(HarvestDirectory.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
306 %(HarvestDirectory.SuppressCom) - Suppress COM elements.
307 %(HarvestDirectory.SuppressRootDirectory) - Suppress a Directory element for the root directory.
308 $(HarvestDirectory.SuppressRegistry) - Suppress registry harvesting.
309
310 [OUT]
311 $(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs
312 - The generated .wxs files which are added to the @(Compile) item list.
313 ================================================================================================
314 -->
315
316 <ItemDefinitionGroup>
317 <HarvestDirectory>
318 <Transforms>$(HarvestDirectoryTransforms)</Transforms>
319 <ComponentGroupName>$(HarvestDirectoryComponentGroupName)</ComponentGroupName>
320 <DirectoryRefId>$(HarvestDirectoryDirectoryRefId)</DirectoryRefId>
321 <KeepEmptyDirectories>$(HarvestDirectoryKeepEmptyDirectories)</KeepEmptyDirectories>
322 <PreprocessorVariable>$(HarvestDirectoryPreprocessorVariable)</PreprocessorVariable>
323 <SuppressCom>$(HarvestDirectorySuppressCom)</SuppressCom>
324 <SuppressRootDirectory>$(HarvestDirectorySuppressRootDirectory)</SuppressRootDirectory>
325 <SuppressRegistry>$(HarvestDirectorySuppressRegistry)</SuppressRegistry>
326 </HarvestDirectory>
327 </ItemDefinitionGroup>
328
329 <PropertyGroup>
330 <HarvestDirectoryDependsOn>
331 GetHarvestDirectoryContent
332 </HarvestDirectoryDependsOn>
333 </PropertyGroup>
334
335 <!-- Creates items to include content since wildcards will not work in Target/@Inputs. -->
336 <Target Name="GetHarvestDirectoryContent">
337 <CreateItem Include="@(HarvestDirectory->'%(FullPath)\**\*')">
338 <Output TaskParameter="Include" ItemName="_HarvestDirectoryContent" />
339 </CreateItem>
340 </Target>
341
342 <Target Name="HarvestDirectory"
343 DependsOnTargets="$(HarvestDirectoryDependsOn)"
344 Inputs="@(_HarvestDirectoryContent);%(HarvestDirectory.Transforms)"
345 Outputs="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
346 Condition=" '@(HarvestDirectory)' != '' ">
347
348 <HeatDirectory
349 NoLogo="true"
350 SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
351 SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
352 TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
353 TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
354 VerboseOutput="$(HarvestDirectoryVerboseOutput)"
355 AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
356 GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
357 OutputFile="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
358 SuppressFragments="$(HarvestDirectorySuppressFragments)"
359 SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
360 Transforms="%(HarvestDirectory.Transforms)"
361 Directory="@(HarvestDirectory)"
362 ComponentGroupName="%(HarvestDirectory.ComponentGroupName)"
363 DirectoryRefId="%(HarvestDirectory.DirectoryRefId)"
364 KeepEmptyDirectories="%(HarvestDirectory.KeepEmptyDirectories)"
365 PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)"
366 SuppressCom="%(HarvestDirectory.SuppressCom)"
367 SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
368 SuppressRegistry="%(HarvestDirectory.SuppressRegistry)"
369 AdditionalOptions="$(HarvestDirectoryAdditionalOptions)"
370 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
371 ToolExe="$(HeatToolExe)"
372 ToolPath="$(HeatToolDir)">
373
374 <Output TaskParameter="OutputFile" ItemName="Compile" />
375 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
376
377 </HeatDirectory>
378
379 </Target>
380
381 <!--
382 ================================================================================================
383 HarvestFile
384
385 Harvests files of different types using heat.exe. This can harvest registry from
386 self-registering files, files with typelibs, and more.
387
388 [IN]
389 @(HarvestFile) - The list of files to harvest.
390 %(HarvestFile.Transforms) - XSL transforms to apply to the harvested WiX.
391 %(HarvestFile.ComponentGroupName) - The name of the ComponentGroup to create.
392 %(HarvestFile.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
393 %(HarvestFile.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
394 %(HarvestFile.SuppressCom) - Suppress COM elements.
395 %(HarvestFile.SuppressRootDirectory) - Suppress a Directory element for the root directory.
396 $(HarvestFile.SuppressRegistry) - Suppress registry harvesting.
397
398 [OUT]
399 $(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs
400 - The generated .wxs files which are added to the @(Compile) item list.
401 ================================================================================================
402 -->
403
404 <ItemDefinitionGroup>
405 <HarvestFile>
406 <Transforms>$(HarvestFileTransforms)</Transforms>
407 <ComponentGroupName>$(HarvestFileComponentGroupName)</ComponentGroupName>
408 <DirectoryRefId>$(HarvestFileDirectoryRefId)</DirectoryRefId>
409 <PreprocessorVariable>$(HarvestFilePreprocessorVariable)</PreprocessorVariable>
410 <SuppressCom>$(HarvestFileSuppressCom)</SuppressCom>
411 <SuppressRegistry>$(HarvestFileSuppressRegistry)</SuppressRegistry>
412 <SuppressRootDirectory>$(HarvestFileSuppressRootDirectory)</SuppressRootDirectory>
413 </HarvestFile>
414 </ItemDefinitionGroup>
415
416 <PropertyGroup>
417 <HarvestFileDependsOn></HarvestFileDependsOn>
418 </PropertyGroup>
419 <Target Name="HarvestFile"
420 DependsOnTargets="$(HarvestFileDependsOn)"
421 Inputs="@(HarvestFile);%(HarvestFile.Transforms)"
422 Outputs="@(HarvestFile->'$(IntermediateOutputPath)_%(ComponentGroupName)_%(DirectoryRefId)_%(Filename)%(Extension)_file.wxs')"
423 Condition=" '@(HarvestFile)' != '' ">
424
425 <HeatFile
426 NoLogo="true"
427 SuppressAllWarnings="$(HarvestFileSuppressAllWarnings)"
428 SuppressSpecificWarnings="$(HarvestFileSuppressSpecificWarnings)"
429 TreatWarningsAsErrors="$(HarvestFileTreatWarningsAsErrors)"
430 TreatSpecificWarningsAsErrors="$(HarvestFileTreatSpecificWarningsAsErrors)"
431 VerboseOutput="$(HarvestFileVerboseOutput)"
432 AutogenerateGuids="$(HarvestFileAutogenerateGuids)"
433 GenerateGuidsNow="$(HarvestFileGenerateGuidsNow)"
434 OutputFile="$(IntermediateOutputPath)_%(HarvestFile.ComponentGroupName)_%(HarvestFile.DirectoryRefId)_%(HarvestFile.Filename)%(HarvestFile.Extension)_file.wxs"
435 SuppressFragments="$(HarvestFileSuppressFragments)"
436 SuppressUniqueIds="$(HarvestFileSuppressUniqueIds)"
437 Transforms="%(HarvestFile.Transforms)"
438 File="@(HarvestFile)"
439 ComponentGroupName="%(HarvestFile.ComponentGroupName)"
440 DirectoryRefId="%(HarvestFile.DirectoryRefId)"
441 PreprocessorVariable="%(HarvestFile.PreprocessorVariable)"
442 SuppressCom="%(HarvestFile.SuppressCom)"
443 SuppressRegistry="%(HarvestFile.SuppressRegistry)"
444 SuppressRootDirectory="%(HarvestFile.SuppressRootDirectory)"
445 AdditionalOptions="$(HarvestFileAdditionalOptions)"
446 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
447 ToolExe="$(HeatToolExe)"
448 ToolPath="$(HeatToolDir)">
449
450 <Output TaskParameter="OutputFile" ItemName="Compile" />
451 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
452
453 </HeatFile>
454
455 </Target>
456
457 <!--
458 ================================================================================================
459 RefreshGeneratedFile
460
461 Generates code based on metadata defined in project references.
462
463 [IN]
464 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
465
466 [OUT]
467 @(_GeneratedFiles) - The generated source file.
468 ================================================================================================
469 -->
470 <PropertyGroup>
471 <RefreshGeneratedFileDependsOn></RefreshGeneratedFileDependsOn>
472 </PropertyGroup>
473 <Target Name="RefreshGeneratedFile"
474 DependsOnTargets="$(RefreshGeneratedFileDependsOn)"
475 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
476 Outputs="@(_GeneratedFiles)"
477 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') and '@(_GeneratedFiles)' != '' ">
478
479 <RefreshGeneratedFile
480 GeneratedFiles="@(_GeneratedFiles)"
481 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
482
483 </Target>
484
485 <!--
486 ================================================================================================
487 RefreshBundleGeneratedFile
488
489 Generates code for bundle projects based on metadata defined in project references.
490
491 [IN]
492 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
493
494 [OUT]
495 @(_GeneratedFiles) - The generated source file.
496 ================================================================================================
497 -->
498 <PropertyGroup>
499 <RefreshBundleGeneratedFileDependsOn></RefreshBundleGeneratedFileDependsOn>
500 </PropertyGroup>
501 <Target Name="RefreshBundleGeneratedFile"
502 DependsOnTargets="$(RefreshBundleGeneratedFileDependsOn)"
503 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
504 Outputs="@(_GeneratedFiles)"
505 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle' and '@(_GeneratedFiles)' != '') ">
506
507 <RefreshBundleGeneratedFile
508 GeneratedFiles="@(_GeneratedFiles)"
509 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
510 </Target>
511
512</Project>
diff --git a/src/WixToolset.Sdk/tools/wix.signing.targets b/src/WixToolset.Sdk/tools/wix.signing.targets
new file mode 100644
index 00000000..7c25175f
--- /dev/null
+++ b/src/WixToolset.Sdk/tools/wix.signing.targets
@@ -0,0 +1,370 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 <PropertyGroup>
6 <SignedFileName Condition=" '$(SignedFileName)' == '' ">$(MSBuildProjectFile).Signed.txt</SignedFileName>
7 <SignedFilePath>$(IntermediateOutputPath)$(SignedFileName)</SignedFilePath>
8 </PropertyGroup>
9
10 <UsingTask TaskName="Insignia" AssemblyFile="$(WixTasksPath)" />
11 <UsingTask TaskName="GetCabList" AssemblyFile="$(WixTasksPath)" />
12 <UsingTask TaskName="GetLooseFileList" AssemblyFile="$(WixTasksPath)" />
13
14 <!-- Default Inscribe properties. -->
15 <PropertyGroup>
16 <InscribeNoLogo Condition=" '$(InscribeNoLogo)' == '' ">$(NoLogo)</InscribeNoLogo>
17 <InscribeSuppressAllWarnings Condition=" '$(InscribeSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</InscribeSuppressAllWarnings>
18 <InscribeSuppressSpecificWarnings Condition=" '$(InscribeSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</InscribeSuppressSpecificWarnings>
19 <InscribeTreatWarningsAsErrors Condition=" '$(InscribeTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</InscribeTreatWarningsAsErrors>
20 <InscribeTreatSpecificWarningsAsErrors Condition=" '$(InscribeTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</InscribeTreatSpecificWarningsAsErrors>
21 <InscribeVerboseOutput Condition=" '$(InscribeVerboseOutput)' == '' ">$(VerboseOutput)</InscribeVerboseOutput>
22 </PropertyGroup>
23
24 <!--
25 ==================================================================================================
26 Signing
27 ==================================================================================================
28 -->
29 <PropertyGroup>
30 <InternalSignDependsOn Condition=" '$(OutputType)' == 'Module' ">
31 GetMsmsToSign;
32 InternalSignMsm;
33 </InternalSignDependsOn>
34 <InternalSignDependsOn Condition=" '$(OutputType)' == 'Package' ">
35 GetCabsToSign;
36 GetMsiToSign;
37 InternalSignCabs;
38 InscribeMsi;
39 InternalSignMsi;
40 </InternalSignDependsOn>
41 <InternalSignDependsOn Condition=" '$(OutputType)' == 'Bundle' ">
42 GetContainersToSign;
43 InternalSignContainers;
44 InscribeBundleEngine;
45 InternalSignBundleEngine;
46 InscribeBundle;
47 InternalSignBundle;
48 </InternalSignDependsOn>
49
50 <SigningDependsOn>
51 WixBuild;
52 CalculateSignTargetFiles;
53 BeforeSigning;
54 $(InternalSignDependsOn);
55 AfterSigning
56 </SigningDependsOn>
57 </PropertyGroup>
58 <Target
59 Name="Signing"
60 DependsOnTargets="$(SigningDependsOn)"
61 Inputs="$(TargetPath)"
62 Outputs="$(SignedFilePath)"
63 Condition=" '$(SignOutput)' == 'true' ">
64
65 <ItemGroup>
66 <FileWrites Include="$(SignedFilePath)" />
67 </ItemGroup>
68
69 <WriteLinesToFile
70 File="$(SignedFilePath)"
71 Lines="^$(MSBuildProjectFullPath);@(SignMsm);@(SignCabs);@(SignMsi);@(SignContainers);@(SignBundleEngine);@(SignBundle)"
72 Overwrite="true" />
73 </Target>
74
75 <!-- Internal targets so correct signing targets are called. -->
76 <Target
77 Name="CalculateSignTargetFiles">
78 <ItemGroup>
79 <SignTargetPath Include="$(TargetPath)" />
80 </ItemGroup>
81 </Target>
82
83 <Target
84 Name="GetMsmsToSign"
85 Inputs="@(SignTargetPath)"
86 Outputs="$(SignedFilePath)">
87
88 <ItemGroup>
89 <SignMsm Include="@(SignTargetPath)" />
90 </ItemGroup>
91 </Target>
92
93 <Target
94 Name="InternalSignMsm"
95 DependsOnTargets="SignMsm"
96 Condition=" '@(SignMsm)' != '' " />
97
98 <Target
99 Name="GetCabsToSign"
100 Inputs="@(SignTargetPath)"
101 Outputs="$(SignedFilePath)">
102 <GetCabList Database="%(SignTargetPath.FullPath)">
103 <Output TaskParameter="CabList" ItemName="SignCabs" />
104 <Output TaskParameter="CabList" ItemName="FileWrites" />
105 </GetCabList>
106 </Target>
107
108 <Target
109 Name="InternalSignCabs"
110 DependsOnTargets="SignCabs"
111 Condition=" '@(SignCabs)' != '' " />
112
113 <Target
114 Name="GetMsiToSign"
115 Inputs="@(SignTargetPath)"
116 Outputs="$(SignedFilePath)">
117 <CreateItemAvoidingInference InputProperties="@(SignTargetPath)">
118 <Output TaskParameter="OuputItems" ItemName="SignMsi" />
119 <Output TaskParameter="OuputItems" ItemName="FileWrites" />
120 </CreateItemAvoidingInference>
121 </Target>
122
123 <Target
124 Name="InternalSignMsi"
125 DependsOnTargets="SignMsi"
126 Inputs="@(SignTargetPath)"
127 Outputs="$(SignedFilePath)"
128 Condition=" '@(SignMsi)' != '' " />
129
130 <Target
131 Name="GetContainersToSign"
132 Inputs="@(SignTargetPath)"
133 Outputs="$(SignedFilePath)">
134 <!-- TODO: implement signing detached containers -->
135 </Target>
136
137 <Target
138 Name="InternalSignContainers"
139 DependsOnTargets="SignContainers"
140 Condition=" '@(SignContainers)' != '' " />
141
142 <Target
143 Name="InternalSignBundleEngine"
144 DependsOnTargets="SignBundleEngine"
145 Condition=" '@(SignBundleEngine)' != '' " />
146
147 <Target
148 Name="InternalSignBundle"
149 DependsOnTargets="SignBundle"
150 Condition=" '@(SignBundle)' != '' " />
151
152 <!--
153 ================================================================================================
154 InscribeMsi
155
156 To be called after signing an MSI's cabs - inscribes an MSI with the digital signature of its
157 external cabs.
158
159 [IN/OUT]
160 @(SignTargetPath) - The database file to inscribe - database file will be modified in-place.
161
162 [OUT]
163 @(SignMsi) - The database file to sign.
164 ================================================================================================
165 -->
166 <PropertyGroup>
167 <InscribeMsiDependsOn>
168 </InscribeMsiDependsOn>
169 </PropertyGroup>
170 <Target
171 Name="InscribeMsi"
172 DependsOnTargets="$(InscribeMsiDependsOn)"
173 Inputs="@(SignTargetPath)"
174 Outputs="$(SignedFilePath)"
175 Condition=" '@(SignCabs)' != '' ">
176
177 <Insignia
178 DatabaseFile="%(SignTargetPath.FullPath)"
179 OutputFile="%(SignTargetPath.FullPath)"
180 ToolPath="$(WixToolPath)"
181 NoLogo="$(InscribeNoLogo)"
182 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
183 SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
184 SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
185 TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
186 TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
187 VerboseOutput="$(InscribeVerboseOutput)"
188 AdditionalOptions="$(InscribeAdditionalOptions)" />
189 </Target>
190
191 <!--
192 ================================================================================================
193 InscribeBundleEngine
194
195 To be called after signing a bundle's detached containers. Also removes attached container
196 so engine can be signed without attached container.
197
198 [IN]
199 @(SignTargetPath) - The bundle to inscribe.
200
201 [OUT]
202 @(SignBundleEngine) - The bundle engine file to be signed.
203 ================================================================================================
204 -->
205 <PropertyGroup>
206 <InscribeBundleEngineDependsOn>
207 </InscribeBundleEngineDependsOn>
208 </PropertyGroup>
209 <Target
210 Name="InscribeBundleEngine"
211 DependsOnTargets="$(InscribeBundleEngineDependsOn)"
212 Inputs="@(SignTargetPath)"
213 Outputs="$(SignedFilePath)">
214
215 <Insignia
216 BundleFile="@(SignTargetPath)"
217 OutputFile="$(IntermediateOutputPath)%(SignTargetPath.Filename)%(SignTargetPath.Extension)"
218 ToolPath="$(WixToolPath)"
219 NoLogo="$(InscribeNoLogo)"
220 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
221 SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
222 SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
223 TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
224 TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
225 VerboseOutput="$(InscribeVerboseOutput)"
226 AdditionalOptions="$(InscribeAdditionalOptions)">
227 <Output TaskParameter="Output" ItemName="SignBundleEngine" />
228 </Insignia>
229
230 <!-- Explicitly add output to FileWrites to ensure they are included even when the target is up to date. -->
231 <ItemGroup>
232 <FileWrites Include="$(IntermediateOutputPath)%(SignTargetPath.Filename)%(SignTargetPath.Extension)" />
233 </ItemGroup>
234 </Target>
235
236 <!--
237 ================================================================================================
238 InscribeBundle
239
240 To be called after signing the bundle engine to reattach the attached container.
241
242 [IN]
243 @(Inscribe) - The bundle to inscribe.
244
245 [OUT]
246 @(SignBundle) - The bundle engine file to be signed.
247 ================================================================================================
248 -->
249 <PropertyGroup>
250 <InscribeBundleDependsOn>
251 </InscribeBundleDependsOn>
252 </PropertyGroup>
253 <Target
254 Name="InscribeBundle"
255 DependsOnTargets="$(InscribeBundleDependsOn)"
256 Inputs="@(SignTargetPath)"
257 Outputs="$(SignedFilePath)">
258
259 <Insignia
260 BundleFile="@(SignBundleEngine)"
261 OriginalBundleFile="@(SignTargetPath)"
262 OutputFile="@(SignTargetPath)"
263 ToolPath="$(WixToolPath)"
264 NoLogo="$(InscribeNoLogo)"
265 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
266 SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
267 SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
268 TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
269 TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
270 VerboseOutput="$(InscribeVerboseOutput)"
271 AdditionalOptions="$(InscribeAdditionalOptions)">
272 <Output TaskParameter="Output" ItemName="SignBundle" />
273 <Output TaskParameter="Output" ItemName="FileWrites" />
274 </Insignia>
275 </Target>
276
277 <!--
278 ==================================================================================================
279 BeforeSigning
280
281 Redefine this target in your project in order to run tasks just before all signing tasks.
282 ==================================================================================================
283 -->
284 <Target Name="BeforeSigning" />
285
286 <!--
287 ==================================================================================================
288 SignMsm
289
290 Redefine this target in your project in order to sign merge modules.
291
292 [IN]
293 @(SignMsm) - merge module files to sign.
294 ==================================================================================================
295 -->
296 <Target Name="SignMsm" />
297
298 <!--
299 ==================================================================================================
300 SignCabs
301
302 Redefine this target in your project in order to sign the cabs of your database.
303
304 [IN]
305 @(SignCabs) - cabinet files to sign.
306 ==================================================================================================
307 -->
308 <Target Name="SignCabs" />
309
310 <!--
311 ==================================================================================================
312 SignMsi
313
314 Redefine this target in your project in order to sign your database, after it has been inscribed
315 with the signatures of your signed cabs.
316
317 [IN]
318 @(SignMsi) - database files to sign.
319 ==================================================================================================
320 -->
321 <Target Name="SignMsi" />
322
323 <!--
324 ==================================================================================================
325 SignContainers
326
327 Redefine this target in your project in order to sign your bundle's detached containers.
328
329 [IN]
330 @(SignContainers) - detached container files to sign.
331 ==================================================================================================
332 -->
333 <Target Name="SignContainers" />
334
335 <!--
336 ==================================================================================================
337 SignBundleEngine
338
339 Redefine this target in your project in order to sign your bundle, after it has been inscribed
340 with the signatures of your signed containers.
341
342 [IN]
343 @(SignBundleEngine) - bundle engine file to sign.
344 ==================================================================================================
345 -->
346 <Target Name="SignBundleEngine" />
347
348 <!--
349 ==================================================================================================
350 SignBundle
351
352 Redefine this target in your project in order to sign your bundle, after the attached container
353 is reattached.
354
355 [IN]
356 @(SignBundle) - bundle file to sign.
357 ==================================================================================================
358 -->
359 <Target Name="SignBundle" />
360
361 <!--
362 ==================================================================================================
363 AfterSigning
364
365 Redefine this target in your project in order to run tasks just after all signing tasks.
366 ==================================================================================================
367 -->
368 <Target Name="AfterSigning" />
369
370</Project>
diff --git a/src/WixToolset.Sdk/tools/wix.targets b/src/WixToolset.Sdk/tools/wix.targets
new file mode 100644
index 00000000..6914d03e
--- /dev/null
+++ b/src/WixToolset.Sdk/tools/wix.targets
@@ -0,0 +1,1083 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="_CheckRequiredProperties" DefaultTargets="Build">
5 <PropertyGroup>
6 <WixTargetsImported>true</WixTargetsImported>
7 </PropertyGroup>
8
9 <!--
10 //////////////////////////////////////////////////////////////////////////////////////////////////
11 //////////////////////////////////////////////////////////////////////////////////////////////////
12 Extension Points
13 //////////////////////////////////////////////////////////////////////////////////////////////////
14 //////////////////////////////////////////////////////////////////////////////////////////////////
15 -->
16
17 <!-- Allow a user-customized targets files to be used as part of the build. -->
18 <Import Project="$(CustomBeforeWixTargets)" Condition=" '$(CustomBeforeWixTargets)' != '' and Exists('$(CustomBeforeWixTargets)')" />
19
20 <!-- These properties can be overridden to support non-default installations. -->
21 <PropertyGroup>
22 <WixBinDir Condition=" '$(WixBinDir)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">$(MSBuildThisFileDirectory)netcoreapp2.1\</WixBinDir>
23 <WixBinDir Condition=" '$(WixBinDir)' == '' ">$(MSBuildThisFileDirectory)net461\x86\</WixBinDir>
24 <WixBinDir64 Condition=" '$(WixBinDir64)' == '' and '$(MSBuildRuntimeType)' != 'Core' ">$(MSBuildThisFileDirectory)net461\x64\</WixBinDir64>
25 <WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(WixBinDir)WixToolset.BuildTasks.dll</WixTasksPath>
26 <WixTasksPath64 Condition=" '$(WixTasksPath64)' == '' and '$(WixBinDir64)' != '' ">$(WixBinDir64)WixToolset.BuildTasks.dll</WixTasksPath64>
27 </PropertyGroup>
28
29 <PropertyGroup>
30 <WixHarvestTargetsPath Condition=" '$(WixHarvestTargetsPath)' == '' ">$(MSBuildThisFileDirectory)wix.harvest.targets</WixHarvestTargetsPath>
31 <WixSigningTargetsPath Condition=" '$(WixSigningTargetsPath)' == '' ">$(MSBuildThisFileDirectory)wix.signing.targets</WixSigningTargetsPath>
32 </PropertyGroup>
33
34 <!-- This makes the project files a dependency of all targets so that things rebuild if they change -->
35 <PropertyGroup>
36 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
37 <MSBuildAllProjects Condition="Exists('$(WixHarvestTargetsPath)')">$(MSBuildAllProjects);$(WixHarvestTargetsPath)</MSBuildAllProjects>
38 <MSBuildAllProjects Condition="Exists('$(WixSigningTargetsPath)')">$(MSBuildAllProjects);$(WixSigningTargetsPath)</MSBuildAllProjects>
39 <MSBuildAllProjects Condition="Exists('$(CustomBeforeWixTargets)')">$(MSBuildAllProjects);$(CustomBeforeWixTargets)</MSBuildAllProjects>
40 <MSBuildAllProjects Condition="Exists('$(CustomAfterWixTargets)')">$(MSBuildAllProjects);$(CustomAfterWixTargets)</MSBuildAllProjects>
41 </PropertyGroup>
42
43 <!--
44 //////////////////////////////////////////////////////////////////////////////////////////////////
45 //////////////////////////////////////////////////////////////////////////////////////////////////
46 Declarations for Microsoft.Common.targets
47 //////////////////////////////////////////////////////////////////////////////////////////////////
48 //////////////////////////////////////////////////////////////////////////////////////////////////
49 -->
50
51 <PropertyGroup>
52 <DefaultLanguageSourceExtension>.wxs</DefaultLanguageSourceExtension>
53 <Language>wix</Language>
54 <TargetRuntime>wix</TargetRuntime>
55
56 <!-- Use OutputName to set the AssemblyName for Microsoft.Common.targets -->
57 <OutputName Condition=" '$(OutputName)'=='' ">$(MSBuildProjectName)</OutputName>
58 <AssemblyName>$(OutputName)</AssemblyName>
59
60 <!-- Default OutputType to a known WiX Toolset type. -->
61 <OutputType Condition=" '$(OutputType)' == '' ">Package</OutputType>
62
63 <!-- Default WixPdbType to a known WiX Toolset type. -->
64 <WixPdbType Condition=" '$(WixPdbType)' == '' ">full</WixPdbType>
65 </PropertyGroup>
66
67 <!--
68 IDE Macros available from both integrated builds and from command line builds.
69 The following properties are 'macros' that are available via IDE for pre and post build steps.
70 All of them should be added to WixBuildMacroCollection to ensure that they are shown in the UI.
71 -->
72 <PropertyGroup Condition=" '$(TargetExt)' == '' ">
73 <TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt>
74 <TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt>
75 <TargetExt Condition=" '$(OutputType)' == 'PatchCreation' ">.pcp</TargetExt>
76 <TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt>
77 <TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt>
78 <TargetExt Condition=" '$(OutputType)' == 'IntermediatePostLink' ">.wixipl</TargetExt>
79 </PropertyGroup>
80
81 <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
82
83 <PropertyGroup>
84 <!-- Default pdb output path to the intermediate output directory -->
85 <PdbOutputDir Condition=" '$(PdbOutputDir)'=='' ">$(TargetDir)</PdbOutputDir>
86 <PdbOutputDir Condition=" !HasTrailingSlash('$(PdbOutputDir)') ">$(PdbOutputDir)\</PdbOutputDir>
87
88 <!-- Example, C:\MyProjects\MyProject\bin\debug\ -->
89 <TargetPdbDir Condition=" '$(PdbOutputDir)'!='' ">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(PdbOutputDir)`))`))</TargetPdbDir>
90
91 <!-- Example, MySetup.wixpdb" -->
92 <TargetPdbFileName Condition=" '$(TargetPdbFileName)' == '' ">$(TargetName).wixpdb</TargetPdbFileName>
93
94 <!-- Example, C:\MyProjects\MyProject\bin\debug\MyPackage.wixpdb -->
95 <TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetPdbDir)$(TargetPdbFileName)</TargetPdbPath>
96 </PropertyGroup>
97
98 <!--
99 //////////////////////////////////////////////////////////////////////////////////////////////////
100 //////////////////////////////////////////////////////////////////////////////////////////////////
101 Property Declarations
102 //////////////////////////////////////////////////////////////////////////////////////////////////
103 //////////////////////////////////////////////////////////////////////////////////////////////////
104 -->
105
106 <!-- These tasks can be used as general-purpose build tasks. -->
107 <UsingTask TaskName="WixBuild" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
108 <UsingTask TaskName="WixBuild" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
109 <UsingTask TaskName="WixBuild" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
110
111 <!-- These tasks are specific to the build process defined in this file, and are not considered general-purpose build tasks. -->
112 <UsingTask TaskName="CreateItemAvoidingInference" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
113 <UsingTask TaskName="CreateItemAvoidingInference" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
114 <UsingTask TaskName="CreateItemAvoidingInference" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
115
116 <UsingTask TaskName="CreateProjectReferenceDefineConstants" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
117 <UsingTask TaskName="CreateProjectReferenceDefineConstants" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
118 <UsingTask TaskName="CreateProjectReferenceDefineConstants" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
119
120 <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
121 <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
122 <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
123
124 <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
125 <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
126 <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
127
128 <UsingTask TaskName="ReplaceString" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
129 <UsingTask TaskName="ReplaceString" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
130 <UsingTask TaskName="ReplaceString" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
131
132 <UsingTask TaskName="GenerateCompileWithObjectPath" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
133 <UsingTask TaskName="GenerateCompileWithObjectPath" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
134 <UsingTask TaskName="GenerateCompileWithObjectPath" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
135
136 <PropertyGroup>
137 <BindContentsFile Condition=" '$(BindContentsFile)' == '' ">$(MSBuildProjectFile).BindContentsFileList.txt</BindContentsFile>
138 <BindOutputsFile Condition=" '$(BindOutputsFile)' == '' ">$(MSBuildProjectFile).BindOutputsFileList.txt</BindOutputsFile>
139 <BindBuiltOutputsFile Condition=" '$(BindBuiltOutputsFile)' == '' ">$(MSBuildProjectFile).BindBuiltOutputsFileList.txt</BindBuiltOutputsFile>
140 </PropertyGroup>
141
142 <PropertyGroup>
143 <CabinetCachePath Condition=" '$(CabinetCachePath)'=='' and '$(ReuseCabinetCache)'=='true' ">$(IntermediateOutputPath)cabcache\</CabinetCachePath>
144 </PropertyGroup>
145
146 <PropertyGroup>
147 <WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixBinDir)</WixExtDir>
148 </PropertyGroup>
149
150 <!--
151 //////////////////////////////////////////////////////////////////////////////////////////////////
152 //////////////////////////////////////////////////////////////////////////////////////////////////
153 Default Compiler, Linker, and Librarian Property Declarations
154 //////////////////////////////////////////////////////////////////////////////////////////////////
155 //////////////////////////////////////////////////////////////////////////////////////////////////
156 -->
157
158 <!-- If WixExtension was passed in via the command line, then convert it to an ItemGroup -->
159 <ItemGroup>
160 <WixExtension Include="$(WixExtension)" Condition=" '$(WixExtension)' != '' " />
161 </ItemGroup>
162
163 <!-- Defaut Compiler properties. -->
164 <PropertyGroup>
165 <CompilerNoLogo Condition=" '$(CompilerNoLogo)' == '' ">$(NoLogo)</CompilerNoLogo>
166 <CompilerSuppressAllWarnings Condition=" '$(CompilerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</CompilerSuppressAllWarnings>
167 <CompilerSuppressSpecificWarnings Condition=" '$(CompilerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</CompilerSuppressSpecificWarnings>
168 <CompilerTreatWarningsAsErrors Condition=" '$(CompilerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</CompilerTreatWarningsAsErrors>
169 <CompilerTreatSpecificWarningsAsErrors Condition=" '$(CompilerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</CompilerTreatSpecificWarningsAsErrors>
170 <CompilerVerboseOutput Condition=" '$(CompilerVerboseOutput)' == '' ">$(VerboseOutput)</CompilerVerboseOutput>
171 <!-- TODO: This probably doesn't work any longer since Platform won't be defined until Microsoft.Common.targets is included -->
172 <InstallerPlatform Condition=" '$(InstallerPlatform)' == '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU' ">$(Platform)</InstallerPlatform>
173 </PropertyGroup>
174
175 <!-- Default Lib properties. -->
176 <PropertyGroup>
177 <LibNoLogo Condition=" '$(LibNoLogo)' == '' ">$(NoLogo)</LibNoLogo>
178 <LibBindFiles Condition=" '$(LibBindFiles)' == '' ">$(BindFiles)</LibBindFiles>
179 <LibPedantic Condition=" '$(LibPedantic)' == '' ">$(Pedantic)</LibPedantic>
180 <LibSuppressAllWarnings Condition=" '$(LibSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LibSuppressAllWarnings>
181 <LibSuppressSpecificWarnings Condition=" '$(LibSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LibSuppressSpecificWarnings>
182 <LibSuppressSchemaValidation Condition=" '$(LibSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LibSuppressSchemaValidation>
183 <LibSuppressIntermediateFileVersionMatching Condition=" '$(LibSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LibSuppressIntermediateFileVersionMatching>
184 <LibTreatWarningsAsErrors Condition=" '$(LibTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LibTreatWarningsAsErrors>
185 <LibTreatSpecificWarningsAsErrors Condition=" '$(LibTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LibTreatSpecificWarningsAsErrors>
186 <LibVerboseOutput Condition=" '$(LibVerboseOutput)' == '' ">$(VerboseOutput)</LibVerboseOutput>
187 </PropertyGroup>
188
189 <!-- Default Linker properties. -->
190 <PropertyGroup>
191 <LinkerNoLogo Condition=" '$(LinkerNoLogo)' == '' ">$(NoLogo)</LinkerNoLogo>
192 <LinkerBindFiles Condition=" '$(LinkerBindFiles)' == '' ">$(BindFiles)</LinkerBindFiles>
193 <LinkerPedantic Condition=" '$(LinkerPedantic)' == '' ">$(Pedantic)</LinkerPedantic>
194 <LinkerSuppressAllWarnings Condition=" '$(LinkerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LinkerSuppressAllWarnings>
195 <LinkerSuppressSpecificWarnings Condition=" '$(LinkerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
196 <LinkerSuppressSchemaValidation Condition=" '$(LinkerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LinkerSuppressSchemaValidation>
197 <LinkerSuppressIntermediateFileVersionMatching Condition=" '$(LinkerSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LinkerSuppressIntermediateFileVersionMatching>
198 <LinkerTreatWarningsAsErrors Condition=" '$(LinkerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LinkerTreatWarningsAsErrors>
199 <LinkerTreatSpecificWarningsAsErrors Condition=" '$(LinkerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LinkerTreatSpecificWarningsAsErrors>
200 <LinkerVerboseOutput Condition=" '$(LinkerVerboseOutput)' == '' ">$(VerboseOutput)</LinkerVerboseOutput>
201 </PropertyGroup>
202
203 <!-- If BindInputPaths (or LinkerBindInputPaths) was passed in via the command line, then convert it to an ItemGroup -->
204 <ItemGroup>
205 <BindInputPaths Include="$(BindInputPaths)" Condition=" '$(BindInputPaths)' != '' " />
206 <LinkerBindInputPaths Include="$(LinkerBindInputPaths)" Condition=" '$(LinkerBindInputPaths)' != '' " />
207 </ItemGroup>
208
209 <!-- Default Lit and Light "properties" -->
210 <ItemGroup>
211 <LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="@(BindInputPaths)" />
212 </ItemGroup>
213
214 <!--
215 //////////////////////////////////////////////////////////////////////////////////////////////////
216 //////////////////////////////////////////////////////////////////////////////////////////////////
217 Initial Targets
218 //////////////////////////////////////////////////////////////////////////////////////////////////
219 //////////////////////////////////////////////////////////////////////////////////////////////////
220 -->
221
222 <!--
223 ==================================================================================================
224 _CheckRequiredProperties
225
226 Checks properties that must be set in the main project file or on the command line before
227 using this .TARGETS file.
228
229 [IN]
230 $(OutputName) - The name of the MSI/MSM/wixlib to build (without the extension)
231 $(OutputType) - Possible values are 'Package', 'PatchCreation', 'Module', 'Library', 'Bundle', 'IntermediatePostLink'
232 ==================================================================================================
233 -->
234 <PropertyGroup>
235 <_PleaseSetThisInProjectFile>Please set this in the project file before the &lt;Import&gt; of the wix.targets file.</_PleaseSetThisInProjectFile>
236 <_OutputTypeDescription>Possible values are: 'Package', 'Module', 'Library', 'Bundle', 'IntermediatePostLink'. $(_PleaseSetThisInProjectFile)</_OutputTypeDescription>
237 </PropertyGroup>
238 <Target Name="_CheckRequiredProperties">
239
240 <Error
241 Code="WIX100"
242 Condition=" '$(OutputName)' == '' "
243 Text="The OutputName property is not set in project &quot;$(MSBuildProjectFile)&quot;. The OutputName defines the name of the output without a file extension. $(_PleaseSetThisInProjectFile)" />
244
245 <Error
246 Code="WIX101"
247 Condition=" '$(OutputType)' != 'Package' and '$(OutputType)' != 'PatchCreation' and '$(OutputType)' != 'Module' and '$(OutputType)' != 'Library' and '$(OutputType)' != 'Bundle' and '$(OutputType)' != 'IntermediatePostLink' "
248 Text="The OutputType property '$(OutputType)' is not valid in project &quot;$(MSBuildProjectFile)&quot;. $(_OutputTypeDescription)" />
249
250 <Error
251 Code="WIX102"
252 Condition=" '$(WixPdbType)' != 'none' and '$(WixPdbType)' != 'full' "
253 Text="The WixPdbType property '$(WixPdbType)' is not valid in project &quot;$(MSBuildProjectFile)&quot;. Supported values are: 'full', 'none'" />
254
255 </Target>
256
257 <!--
258 //////////////////////////////////////////////////////////////////////////////////////////////////
259 //////////////////////////////////////////////////////////////////////////////////////////////////
260 Build Targets
261 //////////////////////////////////////////////////////////////////////////////////////////////////
262 //////////////////////////////////////////////////////////////////////////////////////////////////
263 -->
264
265 <!--
266 ==================================================================================================
267 CoreBuild - OVERRIDE DependsOn
268
269 The core build step calls each of the build targets.
270
271 This is where we insert our targets into the build process.
272 ==================================================================================================
273 -->
274 <PropertyGroup>
275 <CoreBuildDependsOn>
276 BuildOnlySettings;
277 PrepareForBuild;
278 PreBuildEvent;
279
280 WixBuild;
281 Signing;
282
283 GetTargetPath;
284 PrepareForRun;
285 IncrementalClean;
286 PostBuildEvent
287 </CoreBuildDependsOn>
288 </PropertyGroup>
289
290
291 <!--
292 //////////////////////////////////////////////////////////////////////////////////////////////////
293 //////////////////////////////////////////////////////////////////////////////////////////////////
294 Resolve References Targets
295 //////////////////////////////////////////////////////////////////////////////////////////////////
296 //////////////////////////////////////////////////////////////////////////////////////////////////
297 -->
298
299 <!--
300 ==================================================================================================
301 ResolveReferences - OVERRIDE DependsOn
302
303 ==================================================================================================
304 -->
305 <PropertyGroup>
306 <ResolveReferencesDependsOn>
307 BeforeResolveReferences;
308 AssignProjectConfiguration;
309 ResolveProjectReferences;
310 ResolveWixLibraryReferences;
311 ResolveWixExtensionReferences;
312 AfterResolveReferences
313 </ResolveReferencesDependsOn>
314 </PropertyGroup>
315
316 <!--
317 ================================================================================================
318 ResolveProjectReferences
319
320 Builds all of the referenced projects to get their outputs.
321
322 [IN]
323 @(NonVCProjectReference) - The list of non-VC project references.
324
325 [OUT]
326 @(ProjectReferenceWithConfiguration) - The list of non-VC project references.
327 @(WixLibProjects) - Paths to any .wixlibs that were built by referenced projects.
328 ================================================================================================
329 -->
330 <Target
331 Name="ResolveProjectReferences"
332 DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence"
333 Condition=" '@(ProjectReferenceWithConfiguration)' != '' ">
334
335 <!-- Issue a warning for each non-existent project. -->
336 <Warning
337 Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
338 Condition=" '@(_MSBuildProjectReferenceNonexistent)' != '' " />
339
340 <!--
341 When building this project from the IDE or when building a .sln from the command line or
342 when only building .wixlib project references, gather the referenced build outputs. The
343 code that builds the .sln will already have built the project, so there's no need to do
344 it again here and when building only .wixlib project references we'll use the results to
345 determine which projects to build.
346
347 The ContinueOnError setting is here so that, during project load, as much information as
348 possible will be passed to the compilers.
349 -->
350 <MSBuild
351 Projects="@(_MSBuildProjectReferenceExistent)"
352 Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
353 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);%(_MSBuildProjectReferenceExistent.SetPlatform)"
354 Condition="('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '@(_MSBuildProjectReferenceExistent)' != '' "
355 ContinueOnError="!$(BuildingProject)">
356
357 <Output TaskParameter="TargetOutputs" ItemName="_GatheredProjectReferencePaths" />
358 </MSBuild>
359
360 <!--
361 Determine which project references should be built. Note: we will not build any project references
362 if building in the IDE because it builds project references directly.
363
364 If BuildProjectReferences is 'true' (the default) then take all MSBuild project references that exist
365 on disk and add them to the list of things to build. This is the easy case.
366 -->
367 <CreateItem
368 Include="@(_MSBuildProjectReferenceExistent)"
369 Condition=" '$(BuildProjectReferences)' == 'true' and '$(BuildingInsideVisualStudio)' != 'true' ">
370
371 <Output TaskParameter="Include" ItemName="_ProjectReferencesToBuild" />
372 </CreateItem>
373
374 <!--
375 If BuildProjectReferences is 'wixlib' then build only the MSBuild project references that exist and
376 create a .wixlib file. That requires us to first filter the gathered project references down to only
377 those that build .wixlibs.
378 -->
379 <CreateItem
380 Include="@(_GatheredProjectReferencePaths)"
381 Condition=" '$(BuildProjectReferences)' == 'wixlib' and '%(Extension)' == '.wixlib' and '$(BuildingInsideVisualStudio)' != 'true' ">
382
383 <Output TaskParameter="Include" ItemName="_ReferencedWixLibPaths" />
384 </CreateItem>
385
386 <!--
387 The second step when building only 'wixlib' project references is to create the list of existing MSBuild
388 project references that do *not* build a .wixlib. These are the projects that will be skipped.
389 -->
390 <CreateItem
391 Include="@(_MSBuildProjectReferenceExistent->'%(FullPath)')"
392 Exclude="@(_ReferencedWixLibPaths->'%(MSBuildSourceProjectFile)')"
393 Condition=" '$(BuildProjectReferences)' == 'wixlib' and '$(BuildingInsideVisualStudio)' != 'true' ">
394
395 <Output TaskParameter="Include" ItemName="_ProjectReferencesToSkip" />
396 </CreateItem>
397
398 <!--
399 Finally, when building only 'wixlib' project references, the list of projects to build are naturally the
400 list of projects *not* being skipped.
401 -->
402 <CreateItem
403 Include="@(_MSBuildProjectReferenceExistent->'%(FullPath)')"
404 Exclude="@(_ProjectReferencesToSkip)"
405 Condition=" '$(BuildProjectReferences)' == 'wixlib' and '$(BuildingInsideVisualStudio)' != 'true' ">
406
407 <Output TaskParameter="Include" ItemName="_ProjectReferencesToBuild" />
408 </CreateItem>
409
410 <!-- Display a warning for all projects being skipped. -->
411 <Warning
412 Text="BuildProjectReferences set to '$(BuildProjectReferences)'. Skipping the non-Library project: %(_ProjectReferencesToSkip.Identity)"
413 Condition=" '@(_ProjectReferencesToSkip)' != '' " />
414
415 <Message
416 Importance="low"
417 Text="Project reference to build: %(_ProjectReferencesToBuild.Identity), properties: %(_ProjectReferencesToBuild.Properties)"
418 Condition=" '@(_ProjectReferencesToBuild)' != '' " />
419
420 <!--
421 Build referenced projects when building from the command line.
422
423 The $(ProjectReferenceBuildTargets) will normally be blank so that the project's default target
424 is used during a P2P reference. However if a custom build process requires that the referenced
425 project has a different target to build it can be specified.
426 -->
427 <MSBuild
428 Projects="@(_ProjectReferencesToBuild)"
429 Targets="$(ProjectReferenceBuildTargets)"
430 Properties="%(_ProjectReferencesToBuild.SetConfiguration);%(_ProjectReferencesToBuild.SetPlatform)"
431 Condition=" '@(_ProjectReferencesToBuild)' != '' ">
432
433 <Output TaskParameter="TargetOutputs" ItemName="_BuiltProjectReferencePaths" />
434 </MSBuild>
435
436 <!--
437 VC project references must build GetNativeTargetPath because neither GetTargetPath nor the return of the default build
438 target return the output for a native .vcxproj.
439 -->
440 <MSBuild
441 Projects="@(_MSBuildProjectReferenceExistent)"
442 Targets="GetNativeTargetPath"
443 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);%(_MSBuildProjectReferenceExistent.SetPlatform)"
444 Condition=" '@(ProjectReferenceWithConfiguration)' != '' and '%(_MSBuildProjectReferenceExistent.Extension)' == '.vcxproj' ">
445
446 <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" />
447 <Output TaskParameter="TargetOutputs" ItemName="_MSBuildResolvedProjectReferencePaths" />
448 </MSBuild>
449
450 <!-- Assign the unique gathered and built project references to the resolved project
451 reference paths. -->
452 <RemoveDuplicates Inputs="@(_GatheredProjectReferencePaths);@(_BuiltProjectReferencePaths)">
453 <Output TaskParameter="Filtered" ItemName="_ResolvedProjectReferencePaths" />
454 <Output TaskParameter="Filtered" ItemName="_MSBuildResolvedProjectReferencePaths" />
455 </RemoveDuplicates>
456
457 <!-- Create list of all .wixlib project references. -->
458 <CreateItem
459 Include="@(_ResolvedProjectReferencePaths)"
460 Condition=" '%(Extension)' == '.wixlib' ">
461
462 <Output TaskParameter="Include" ItemName="WixLibProjects" />
463 </CreateItem>
464
465 <Message
466 Importance="low"
467 Text="Library from referenced projects: %(WixLibProjects.Identity)"
468 Condition=" '@(WixLibProjects)' != '' " />
469
470 </Target>
471
472 <!--
473 ================================================================================================
474 ResolveWixLibraryReferences
475
476 Resolve the library references to full paths.
477
478 [IN]
479 @(WixLibrary) - The list of .wixlib files.
480
481 [OUT]
482 @(_ResolvedWixLibraryPaths) - Item group with full paths to libraries
483 ================================================================================================
484 -->
485 <PropertyGroup>
486 <ResolveWixLibraryReferencesDependsOn></ResolveWixLibraryReferencesDependsOn>
487 </PropertyGroup>
488 <Target
489 Name="ResolveWixLibraryReferences"
490 DependsOnTargets="$(ResolveWixLibraryReferencesDependsOn)"
491 Condition=" '@(WixLibrary)' != ''">
492
493 <!--
494 The WixLibrarySearchPaths property is set to find assemblies in the following order:
495
496 (1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
497 (2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
498 (3) Treat the reference's Include as if it were a real file name.
499 (4) Path specified by the WixExtDir property.
500 -->
501 <CreateProperty Condition=" '$(WixLibrarySearchPaths)' == '' " Value="
502 $(ReferencePaths);
503 {HintPathFromItem};
504 {RawFileName};
505 $(WixExtDir)
506 ">
507 <Output TaskParameter="Value" PropertyName="WixLibrarySearchPaths" />
508 </CreateProperty>
509
510 <ResolveWixReferences
511 WixReferences="@(WixLibrary)"
512 SearchPaths="$(WixLibrarySearchPaths)"
513 SearchFilenameExtensions=".wixlib">
514 <Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixLibraryPaths" />
515 </ResolveWixReferences>
516
517 <!-- Remove duplicate library items that would cause build errors -->
518 <RemoveDuplicates Inputs="@(_AllResolvedWixLibraryPaths)">
519 <Output TaskParameter="Filtered" ItemName="_ResolvedWixLibraryPaths" />
520 </RemoveDuplicates>
521
522 </Target>
523
524 <!--
525 ==================================================================================================
526 ResolveWixExtensionReferences
527
528 Resolves WiX extension references to full paths. Any properties you use
529 to resolve paths to extensions must be defined before importing this
530 file or the extensions will be automatically resolved to $(WixExtDir).
531
532 [IN]
533 @(WixExtension) - WixExtension item group
534
535 [OUT]
536 @(_ResolvedWixExtensionPaths) - Item group with full paths to extensions
537 ==================================================================================================
538 -->
539 <PropertyGroup>
540 <ResolveWixExtensionReferencesDependsOn></ResolveWixExtensionReferencesDependsOn>
541 </PropertyGroup>
542 <Target
543 Name="ResolveWixExtensionReferences"
544 DependsOnTargets="$(ResolveWixExtensionReferencesDependsOn)"
545 Condition=" '@(WixExtension)' != ''">
546
547 <!--
548 The WixExtensionSearchPaths property is set to find assemblies in the following order:
549
550 (1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
551 (2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
552 (3) Treat the reference's Include as if it were a real file name.
553 (4) Path specified by the WixExtDir property.
554 -->
555 <CreateProperty Condition=" '$(WixExtensionSearchPaths)' == '' " Value="
556 $(ReferencePaths);
557 {HintPathFromItem};
558 {RawFileName};
559 $(WixExtDir)
560 ">
561 <Output TaskParameter="Value" PropertyName="WixExtensionSearchPaths" />
562 </CreateProperty>
563
564 <ResolveWixReferences
565 WixReferences="@(WixExtension)"
566 SearchPaths="$(WixExtensionSearchPaths)"
567 SearchFilenameExtensions=".dll">
568 <Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixExtensionPaths" />
569 </ResolveWixReferences>
570
571 <!-- Remove duplicate extension items that would cause build errors -->
572 <RemoveDuplicates Inputs="@(_AllResolvedWixExtensionPaths)">
573 <Output TaskParameter="Filtered" ItemName="_ResolvedWixExtensionPaths" />
574 </RemoveDuplicates>
575 </Target>
576
577 <!--
578 ================================================================================================
579 GetTargetPath - OVERRIDE DependsOn
580
581 This stand-alone target returns the name of the build product (i.e. MSI, MSM) that would be
582 produced if we built this project.
583 ================================================================================================
584 -->
585 <PropertyGroup>
586 <GetTargetPathDependsOn>AssignTargetPaths</GetTargetPathDependsOn>
587 </PropertyGroup>
588
589
590 <!--
591 //////////////////////////////////////////////////////////////////////////////////////////////////
592 //////////////////////////////////////////////////////////////////////////////////////////////////
593 WixBuild Targets
594 //////////////////////////////////////////////////////////////////////////////////////////////////
595 //////////////////////////////////////////////////////////////////////////////////////////////////
596 -->
597
598 <!--
599 ==================================================================================================
600 WixBuild
601 ==================================================================================================
602 -->
603 <PropertyGroup>
604 <WixBuildDependsOn>
605 ResolveReferences;
606 BeforeCompile;
607 _TimeStampBeforeCompile;
608
609 CalculateDefineConstants;
610 Harvest;
611
612 GenerateCompileWithObjectPath;
613
614 AssignTargetPaths;
615 ReadPreviousBindInputsAndBuiltOutputs;
616
617 CoreWixBuild;
618
619 UpdateLinkFileWrites;
620 _TimeStampAfterCompile;
621 AfterCompile
622 </WixBuildDependsOn>
623 </PropertyGroup>
624 <Target
625 Name="WixBuild"
626 DependsOnTargets="$(WixBuildDependsOn)" />
627
628 <Target
629 Name="CoreWixBuild"
630 Inputs="@(Compile);
631 @(Content);
632 @(EmbeddedResource);
633 @(WixObject);
634 @(_ResolvedProjectReferencePaths);
635 @(_ResolvedWixLibraryPaths);
636 @(_ResolvedWixExtensionPaths);
637 @(_BindInputs);
638 $(MSBuildAllProjects)"
639 Outputs="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile);@(_BindBuiltOutputs)"
640 Condition=" '@(Compile)' != '' ">
641
642 <PropertyGroup>
643 <!--<OutputFile>$([System.IO.Path]::GetFullPath($(TargetDir)%(CultureGroup.OutputFolder)$(TargetFileName)))</OutputFile>-->
644 <OutputFile>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)))</OutputFile>
645 <!--<OutputFile>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)))</OutputFile>-->
646 <PdbOutputFile>$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetPdbFileName)</PdbOutputFile>
647 </PropertyGroup>
648
649 <WixBuild
650 SourceFiles="@(_CompileWithObjectPath)"
651 LibraryFiles="@(WixLibProjects);@(_ResolvedWixLibraryPaths)"
652 LocalizationFiles="@(EmbeddedResource)"
653
654 Cultures="%(CultureGroup.Identity)"
655
656 ExtensionDirectory="$(WixExtDir)"
657 Extensions="@(_ResolvedWixExtensionPaths)"
658
659 IntermediateDirectory="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)"
660
661 OutputFile="$(OutputFile)"
662 OutputType="$(OutputType)"
663 PdbFile="$(PdbOutputFile)"
664 PdbType="$(WixPdbType)"
665
666 AdditionalOptions="$(CompilerAdditionalOptions) $(LinkerAdditionalOptions)"
667 DefineConstants="$(DefineConstants);$(SolutionDefineConstants);$(ProjectDefineConstants);$(ProjectReferenceDefineConstants)"
668 IncludeSearchPaths="$(IncludeSearchPaths)"
669 InstallerPlatform="$(InstallerPlatform)"
670 NoLogo="true"
671 Pedantic="$(Pedantic)"
672 ReferencePaths="$(ReferencePaths)"
673
674 SuppressSpecificWarnings="$(CompilerSuppressSpecificWarnings);$(LinkerSuppressSpecificWarnings)"
675 TreatSpecificWarningsAsErrors="$(CompilerTreatSpecificWarningsAsErrors)"
676
677 BindInputPaths="@(LinkerBindInputPaths)"
678 BindFiles="$(LinkerBindFiles)"
679 BindContentsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)"
680 BindOutputsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)"
681 BindBuiltOutputsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)"
682
683 CabinetCachePath="$(CabinetCachePath)"
684 CabinetCreationThreadCount="$(CabinetCreationThreadCount)"
685 DefaultCompressionLevel="$(DefaultCompressionLevel)"
686
687 UnreferencedSymbolsFile="$(UnreferencedSymbolsFile)"
688 WixProjectFile="$(ProjectPath)"
689 WixVariables="$(WixVariables)"
690
691 SuppressValidation="$(SuppressValidation)"
692 SuppressIces="$(SuppressIces)"
693 AdditionalCub="$(AdditionalCub)"
694
695 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
696 ToolExe="$(WixToolExe)"
697 ToolPath="$(WixToolDir)" />
698
699 <!--
700 SuppressAllWarnings="$(CompilerSuppressAllWarnings);$(LinkerSuppressAllWarnings)"
701 TreatWarningsAsErrors="$(CompilerTreatWarningsAsErrors);$(LinkerTreatWarningsAsErrors)"
702 VerboseOutput="$(CompilerVerboseOutput);$(LinkerVerboseOutput)"
703 -->
704 </Target>
705
706
707 <!--
708 ==================================================================================================
709 CalculateDefineConstants
710
711 Adds project references to the constants passed into the compiler.
712
713 [IN]
714 @(_ResolvedProjectReferencePaths) - paths to projects' outputs
715 $(VSProjectConfigurations) - map of project names to configurations, provided by VS when building in the IDE
716
717 [OUT]
718 $(ProjectReferenceDefineConstants) - the list of referenced project variables to be passed into the compiler
719 ==================================================================================================
720 -->
721 <PropertyGroup>
722 <CalculateDefineConstantsDependsOn>ResolveReferences</CalculateDefineConstantsDependsOn>
723 </PropertyGroup>
724 <Target
725 Name="CalculateDefineConstants"
726 DependsOnTargets="$(CalculateDefineConstantsDependsOn)"
727 Condition=" '@(_ResolvedProjectReferencePaths)' != '' ">
728
729 <PropertyGroup>
730 <ProjectDefineConstants>
731 Configuration=$(ConfigurationName);
732 OutDir=$(OutDir);
733 Platform=$(PlatformName);
734 ProjectDir=$(ProjectDir);
735 ProjectExt=$(ProjectExt);
736 ProjectFileName=$(ProjectFileName);
737 ProjectName=$(ProjectName);
738 ProjectPath=$(ProjectPath);
739 TargetDir=$(TargetDir);
740 TargetExt=$(TargetExt);
741 TargetFileName=$(TargetFileName);
742 TargetName=$(TargetName);
743 TargetPath=$(TargetPath);
744 </ProjectDefineConstants>
745 </PropertyGroup>
746
747 <PropertyGroup>
748 <SolutionDefineConstants Condition=" '$(DevEnvDir)'!='*Undefined*' ">$(SolutionDefineConstants);DevEnvDir=$(DevEnvDir)</SolutionDefineConstants>
749 <SolutionDefineConstants Condition=" '$(SolutionDir)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionDir=$(SolutionDir)</SolutionDefineConstants>
750 <SolutionDefineConstants Condition=" '$(SolutionExt)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionExt=$(SolutionExt)</SolutionDefineConstants>
751 <SolutionDefineConstants Condition=" '$(SolutionFileName)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionFileName=$(SolutionFileName)</SolutionDefineConstants>
752 <SolutionDefineConstants Condition=" '$(SolutionName)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionName=$(SolutionName)</SolutionDefineConstants>
753 <SolutionDefineConstants Condition=" '$(SolutionPath)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionPath=$(SolutionPath)</SolutionDefineConstants>
754 </PropertyGroup>
755
756 <CreateProjectReferenceDefineConstants
757 ProjectReferencePaths="@(_ResolvedProjectReferencePaths)"
758 ProjectConfigurations="$(VSProjectConfigurations)">
759
760 <Output TaskParameter="DefineConstants" PropertyName="ProjectReferenceDefineConstants" />
761 </CreateProjectReferenceDefineConstants>
762
763 <ItemGroup>
764 <LinkerBindInputPaths Include="%(_ResolvedProjectReferencePaths.RootDir)%(_ResolvedProjectReferencePaths.Directory)" />
765 </ItemGroup>
766 </Target>
767
768 <!--
769 ================================================================================================
770 GenerateCompileWithObjectPath
771
772 Generates metadata on the for compile output objects.
773
774 ================================================================================================
775 -->
776 <PropertyGroup>
777 <GenerateCompileWithObjectPathDependsOn></GenerateCompileWithObjectPathDependsOn>
778 </PropertyGroup>
779 <Target
780 Name="GenerateCompileWithObjectPath"
781 Condition=" '@(Compile)' != '' ">
782
783 <GenerateCompileWithObjectPath
784 Compile="@(Compile)"
785 IntermediateOutputPath="$(IntermediateOutputPath)">
786 <Output TaskParameter="CompileWithObjectPath" ItemName="_CompileWithObjectPath" />
787 </GenerateCompileWithObjectPath>
788 </Target>
789
790 <!--
791 ================================================================================================
792 AssignTargetPaths - OVERRIDE Target
793
794 Determines the final list of culture groups to build based on either the Cultures property or
795 those specified in .wxl files.
796
797 Culture groups specified in the Cultures property must be specified as a semi-colon
798 delimited list of groups, with comma-delimited cultures within a group.
799 For example:
800 <Cultures>en-US,en;en-GB,en</Cultures>
801 This will build 2 targets, outputing to en-US and en-GB sub-folders. Light will first look
802 for strings in the first culture (en-US or en-GB) then the second (en).
803
804 Cultures of .wxl files will be used when the Culture property is not set. The culture of a
805 .wxl file is determined by the Culture attribute in the WixLocalization element in the file
806
807 Sets the OutputFolder metadata on each culture group. In most cases this is the same as the
808 first culture in the culture group. When the Culture's property is unspecified and no .wxl
809 files are provided this is the same as the output directory. When the Culture's property
810 specifies a single culture group and no .wxl files are provided this is the same as the output
811 directory.
812
813 Updates the TargetPath and TargetPdbPath properties to be used in subsequent targets.
814
815 [IN]
816 @(EmbeddedResource) - The list of wxl files to use for localization.
817 $(Cultures) - The list of culture groups to build.
818
819 [OUT]
820 @(CultureGroup) - The list of culture group strings with OutputFolder metadata
821 $(TargetPath) - Property list of target link output MSIs/MSMs
822 $(TargetPdbPath) - Property list of target output pdbs
823
824 ================================================================================================
825 -->
826 <Target
827 Name="AssignTargetPaths"
828 Condition=" '$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module' ">
829
830 <WixAssignCulture Cultures="$(Cultures)" Files="@(EmbeddedResource)">
831 <Output TaskParameter="CultureGroups" ItemName="CultureGroup" />
832 </WixAssignCulture>
833
834 <!-- Expand the culture groups then put them back into the appropriate property -->
835 <ItemGroup>
836 <_CulturedTargetPath Include="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetFileName)" />
837 <_CulturedTargetPdbPath Include="$(TargetPdbDir)%(CultureGroup.OutputFolder)$(TargetPdbFileName)" />
838 </ItemGroup>
839
840 <PropertyGroup>
841 <TargetPath>@(_CulturedTargetPath)</TargetPath>
842 <TargetPdbPath>@(_CulturedTargetPdbPath)</TargetPdbPath>
843 </PropertyGroup>
844 </Target>
845
846 <!--
847 ================================================================================================
848 ReadPreviousBindInputsAndBuiltOutputs
849
850 Reads a previous build's Bind contents and built outputs file into @(_BindInputs) and
851 @(_BindBuiltOutputs) respectively.
852
853 Note: Only the *built* outputs are used because using files copied to output folder
854 can cause perpetual incremental build.
855
856 Imagine the case where you have: Msi.wixproj -> Lib.wixproj -> Exe.csproj. The
857 Exe.csproj cannot be both an input to Lib.wixproj and an output of Msi.wixproj
858 (as an uncompressed file) because the Lib.wixproj will always newer than the
859 Exe.csproj.
860
861 [IN]
862
863 [OUT]
864 @(_BindInputs) - the content files required to bind (i.e. the Binary/@SourceFile and File/@Source files).
865 @(_BindBuiltOutputs) - the previously built .msi, .msm, .pcp, .exe .wixpdb, .cabs, etc.
866 Does not include content copied to output folder.
867 ================================================================================================
868 -->
869 <Target
870 Name="ReadPreviousBindInputsAndBuiltOutputs">
871
872 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)">
873 <Output TaskParameter="Lines" ItemName="_BindInputs" />
874 </ReadLinesFromFile>
875
876 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)">
877 <Output TaskParameter="Lines" ItemName="_BindBuiltOutputs" />
878 </ReadLinesFromFile>
879
880 <Message Importance="low" Text="Previous bind inputs: @(_BindInputs)" />
881 <Message Importance="low" Text="Previous bind outputs: @(_BindBuiltOutputs)" />
882 </Target>
883
884 <!--
885 ================================================================================================
886 UpdateLinkFileWrites
887
888 Reads the bind outputs file(s) output generated during WixBuild to correctly set the @(FileWrites)
889 item. Most targets have it easy because they can do a static mapping from inputs to the outputs.
890 However, the WixBuild target outputs are determined after a rather complex calculation we call
891 linking and binding!
892
893 This target runs independently after Link to ensure that @(FileWrites) is updated even if the
894 "WixBuild" task fails.
895
896 [IN]
897 Path to bind outputs file(s).
898
899 [OUT]
900 @(FileWrites) updated with outputs from bind.
901 ================================================================================================
902 -->
903 <Target
904 Name="UpdateLinkFileWrites">
905
906 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)">
907 <Output TaskParameter="Lines" ItemName="FileWrites"/>
908 </ReadLinesFromFile>
909
910 <ItemGroup>
911 <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)') " />
912 <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)') " />
913 <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)') " />
914 </ItemGroup>
915
916 <Message Importance="low" Text="Build files after link: @(FileWrites)" />
917 </Target>
918
919 <!--
920 //////////////////////////////////////////////////////////////////////////////////////////////////
921 //////////////////////////////////////////////////////////////////////////////////////////////////
922 AllProjectOutputGroups Section
923 //////////////////////////////////////////////////////////////////////////////////////////////////
924 //////////////////////////////////////////////////////////////////////////////////////////////////
925 -->
926
927 <!--
928 ==================================================================================================
929 AllProjectOutputGroups - OVERRIDE Target
930
931 ==================================================================================================
932 -->
933 <Target
934 Name="AllProjectOutputGroups"
935 DependsOnTargets="
936 BuiltProjectOutputGroup;
937 DebugSymbolsProjectOutputGroup;
938 SourceFilesProjectOutputGroup;
939 ContentFilesProjectOutputGroup" />
940
941 <!--
942 This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE.
943 Reading an item is faster than invoking a target.
944 -->
945 <ItemGroup>
946 <BuiltProjectOutputGroupKeyOutput Include="$(TargetPath)">
947 <IsKeyOutput>true</IsKeyOutput>
948 <FinalOutputPath>$(TargetPath)</FinalOutputPath>
949 <TargetPath>$(TargetFileName)</TargetPath>
950 </BuiltProjectOutputGroupKeyOutput>
951 </ItemGroup>
952
953 <!--
954 ==================================================================================================
955 BuiltProjectOutputGroup - OVERRIDE Target
956 ==================================================================================================
957 -->
958 <PropertyGroup>
959 <BuiltProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</BuiltProjectOutputGroupDependsOn>
960 </PropertyGroup>
961 <Target
962 Name="BuiltProjectOutputGroup"
963 Outputs="@(BuiltProjectOutputGroupOutput)"
964 DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)">
965
966 <!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below -->
967
968 <!-- Try to read the outputs from the bind outputs text file since that's the output list straight from linker. -->
969 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)">
970 <Output TaskParameter="Lines" ItemName="_BuiltProjectOutputGroupOutputIntermediate"/>
971 </ReadLinesFromFile>
972
973 <!-- If we didn't get anything from the bind outputs text file, default to the target path. -->
974 <ItemGroup Condition=" '@(_BuiltProjectOutputGroupOutputIntermediate)'=='' ">
975 <_BuiltProjectOutputGroupOutputIntermediate Include="$(TargetPath)" />
976 </ItemGroup>
977
978 <!-- Convert intermediate items into final items; this way we can get the full path for each item -->
979 <ItemGroup>
980 <BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')">
981 <!-- For compatibility with 2.0 -->
982 <OriginalItemSpec Condition="'%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == ''">%(_BuiltProjectOutputGroupOutputIntermediate.FullPath)</OriginalItemSpec>
983 </BuiltProjectOutputGroupOutput>
984 </ItemGroup>
985 </Target>
986
987 <!--
988 ==================================================================================================
989 DebugSymbolsProjectOutputGroup
990
991 Populates the Debug Symbols project output group.
992 ==================================================================================================
993 -->
994 <PropertyGroup>
995 <DebugSymbolsProjectOutputGroupDependsOn>AssignTargetPaths</DebugSymbolsProjectOutputGroupDependsOn>
996 </PropertyGroup>
997 <Target
998 Name="DebugSymbolsProjectOutputGroup"
999 Outputs="@(DebugSymbolsProjectOutputGroupOutput)"
1000 DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)">
1001
1002 <!-- Include build output pdb(s). Different than predefined itemgroup since AssignTargetPaths target may change -->
1003 <ItemGroup>
1004 <DebugSymbolsProjectOutputGroupOutput Include="$(TargetPdbPath)" Condition=" '$(SuppressPdbOutput)' != 'true' "/>
1005 </ItemGroup>
1006 </Target>
1007
1008
1009 <!--
1010 ==================================================================================================
1011 CopyFilesToOutputDirectory - OVERRIDE Target
1012
1013 Copy all build outputs, satellites and other necessary files to the final directory.
1014 ============================================================
1015 -->
1016 <Target
1017 Name="CopyFilesToOutputDirectory">
1018
1019 <PropertyGroup>
1020 <!-- By default we're using hard links to copy to the output directory, disabling this could slow the build significantly -->
1021 <CreateHardLinksForCopyFilesToOutputDirectoryIfPossible Condition=" '$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)' == '' ">true</CreateHardLinksForCopyFilesToOutputDirectoryIfPossible>
1022 </PropertyGroup>
1023
1024 <PropertyGroup>
1025 <CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory>
1026 <CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory>
1027 <FullIntermediateOutputPath>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)))</FullIntermediateOutputPath>
1028 </PropertyGroup>
1029
1030 <!-- Copy the bound files. -->
1031 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)">
1032 <Output TaskParameter="Lines" ItemName="_FullPathToCopy"/>
1033 </ReadLinesFromFile>
1034
1035 <ItemGroup>
1036 <_FullPathToCopy Include="$(OutputFile)" Condition=" '@(_FullPathToCopy)'=='' " />
1037 <_RelativePath Include="$([MSBuild]::MakeRelative($(FullIntermediateOutputPath), %(_FullPathToCopy.Identity)))" />
1038 </ItemGroup>
1039
1040 <Copy
1041 SourceFiles="@(_RelativePath->'$(IntermediateOutputPath)%(Identity)')"
1042 DestinationFiles="@(_RelativePath->'$(OutDir)%(Identity)')"
1043 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
1044 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
1045 Retries="$(CopyRetryCount)"
1046 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
1047 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
1048 Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'"
1049 >
1050
1051 <Output TaskParameter="DestinationFiles" ItemName="MainAssembly"/>
1052 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
1053
1054 </Copy>
1055
1056 <Message Importance="High" Text="$(MSBuildProjectName) -&gt; $(TargetPath)" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />
1057 <!--<Message Importance="High" Text="$(MSBuildProjectName) -&gt; @(MainAssembly->'%(FullPath)')" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />-->
1058
1059 <!-- Copy the debug information file (.pdb), if any
1060 <Copy
1061 SourceFiles="@(_DebugSymbolsIntermediatePath)"
1062 DestinationFiles="@(_DebugSymbolsOutputPath)"
1063 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
1064 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
1065 Retries="$(CopyRetryCount)"
1066 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
1067 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
1068 Condition="'$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true'">
1069
1070 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
1071
1072 </Copy>
1073 -->
1074 </Target>
1075
1076
1077 <Import Project="$(WixHarvestTargetsPath)" Condition=" '$(WixHarvestTargetsPath)' != '' and Exists('$(WixHarvestTargetsPath)')" />
1078 <Import Project="$(WixSigningTargetsPath)" Condition=" '$(WixSigningTargetsPath)' != '' and Exists('$(WixSigningTargetsPath)')" />
1079
1080 <!-- Extension point: Define CustomAfterWixTargets to a .targets file that you want to include after this file. -->
1081 <Import Project="$(CustomAfterWixTargets)" Condition=" '$(CustomAfterWixTargets)' != '' and Exists('$(CustomAfterWixTargets)')" />
1082
1083</Project>