aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/HarvestPayloadsSymbol.cs68
-rw-r--r--src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs1
-rw-r--r--src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj10
-rw-r--r--src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs8
-rw-r--r--src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt15
-rw-r--r--src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj10
-rw-r--r--src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs8
-rw-r--r--src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt15
-rw-r--r--src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj10
-rw-r--r--src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs8
-rw-r--r--src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt15
-rw-r--r--src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj10
-rw-r--r--src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs8
-rw-r--r--src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt15
-rw-r--r--src/ext/Bal/test/examples/examples.proj6
-rw-r--r--src/test/burn/TestData/Manual/BundleB/Bundle.wxs4
-rw-r--r--src/test/burn/TestData/Manual/BundleB/BundleB.wixproj14
-rw-r--r--src/test/burn/TestData/Manual/BundleB/BundleB.wxs2
-rw-r--r--src/test/burn/TestData/Manual/BundleB/ba.xslt21
-rw-r--r--src/test/burn/TestData/Manual/BundleB/package.xslt21
-rw-r--r--src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs1
-rw-r--r--src/wix/WixToolset.Core/Compiler.cs4
-rw-r--r--src/wix/WixToolset.Core/Compiler_Bundle.cs95
-rw-r--r--src/wix/WixToolset.Core/HarvestFilesAndPayloadsCommand.cs (renamed from src/wix/WixToolset.Core/HarvestFilesCommand.cs)85
-rw-r--r--src/wix/WixToolset.Core/Optimizer.cs2
-rw-r--r--src/wix/WixToolset.Core/OptimizerWarnings.cs2
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs11
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/HarvestFilesFixture.cs6
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/TestData/SharedPayloadsBetweenPackages/SharedPayloadsBetweenPackages.wxs3
-rw-r--r--src/xsd/wix.xsd62
30 files changed, 342 insertions, 198 deletions
diff --git a/src/api/wix/WixToolset.Data/Symbols/HarvestPayloadsSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/HarvestPayloadsSymbol.cs
new file mode 100644
index 00000000..65b424ac
--- /dev/null
+++ b/src/api/wix/WixToolset.Data/Symbols/HarvestPayloadsSymbol.cs
@@ -0,0 +1,68 @@
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
3namespace WixToolset.Data
4{
5 using WixToolset.Data.Symbols;
6
7 public static partial class SymbolDefinitions
8 {
9 public static readonly IntermediateSymbolDefinition HarvestPayloads = new IntermediateSymbolDefinition(
10 SymbolDefinitionType.HarvestPayloads,
11 new[]
12 {
13 new IntermediateFieldDefinition(nameof(HarvestFilesSymbolFields.Inclusions), IntermediateFieldType.String),
14 new IntermediateFieldDefinition(nameof(HarvestFilesSymbolFields.Exclusions), IntermediateFieldType.String),
15 new IntermediateFieldDefinition(nameof(HarvestFilesSymbolFields.ComplexReferenceParentType), IntermediateFieldType.String),
16 new IntermediateFieldDefinition(nameof(HarvestFilesSymbolFields.ParentId), IntermediateFieldType.String),
17 },
18 typeof(HarvestPayloadsSymbol));
19 }
20}
21
22namespace WixToolset.Data.Symbols
23{
24 public enum HarvestPayloadsSymbolFields
25 {
26 Inclusions,
27 Exclusions,
28 ComplexReferenceParentType,
29 ParentId,
30 }
31
32 public class HarvestPayloadsSymbol : IntermediateSymbol
33 {
34 public HarvestPayloadsSymbol() : base(SymbolDefinitions.HarvestPayloads, null, null)
35 {
36 }
37
38 public HarvestPayloadsSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.HarvestPayloads, sourceLineNumber, id)
39 {
40 }
41
42 public IntermediateField this[HarvestPayloadsSymbolFields index] => this.Fields[(int)index];
43
44 public string Inclusions
45 {
46 get => (string)this.Fields[(int)HarvestPayloadsSymbolFields.Inclusions];
47 set => this.Set((int)HarvestPayloadsSymbolFields.Inclusions, value);
48 }
49
50 public string Exclusions
51 {
52 get => (string)this.Fields[(int)HarvestPayloadsSymbolFields.Exclusions];
53 set => this.Set((int)HarvestPayloadsSymbolFields.Exclusions, value);
54 }
55
56 public string ComplexReferenceParentType
57 {
58 get => (string)this.Fields[(int)HarvestPayloadsSymbolFields.ComplexReferenceParentType];
59 set => this.Set((int)HarvestPayloadsSymbolFields.ComplexReferenceParentType, value);
60 }
61
62 public string ParentId
63 {
64 get => (string)this.Fields[(int)HarvestPayloadsSymbolFields.ParentId];
65 set => this.Set((int)HarvestPayloadsSymbolFields.ParentId, value);
66 }
67 }
68}
diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
index 64f51162..64c1a2a5 100644
--- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
+++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs
@@ -41,6 +41,7 @@ namespace WixToolset.Data
41 File, 41 File,
42 FileSFPCatalog, 42 FileSFPCatalog,
43 HarvestFiles, 43 HarvestFiles,
44 HarvestPayloads,
44 Icon, 45 Icon,
45 ImageFamilies, 46 ImageFamilies,
46 IniFile, 47 IniFile,
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj
index 1179bea7..aea77d1b 100644
--- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj
+++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj
@@ -1,14 +1,6 @@
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. --> 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<Project Sdk="WixToolset.Sdk"> 2<Project Sdk="WixToolset.Sdk">
3 <ItemGroup> 3 <ItemGroup>
4 <BindPath Include="$(OutputPath)publish\Example.EarliestCoreMBA\scd" /> 4 <BindPath Include="$(OutputPath)publish\Example.EarliestCoreMBA\scd" BindName="ba.payloads" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.EarliestCoreMBA\scd">
6 <DirectoryRefId>publish.Example.EarliestCoreMBA.scd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10
11 <ItemGroup>
12 <PackageReference Include="WixToolset.Heat" />
13 </ItemGroup> 5 </ItemGroup>
14</Project> 6</Project>
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs
index 38a167f1..68b697e7 100644
--- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs
+++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs
@@ -1,9 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> 2 <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication SourceFile="Example.EarliestCoreMBA.exe"> 3 <BootstrapperApplication SourceFile="!(bindpath.ba.payloads)\Example.EarliestCoreMBA.exe">
4 <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> 4 <Payloads Include="!(bindpath.ba.payloads)\**">
5 <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> 5 <Exclude Files="!(bindpath.ba.payloads)\Example.EarliestCoreMBA.exe" />
6 </Payloads>
6 </BootstrapperApplication> 7 </BootstrapperApplication>
8
7 <Chain> 9 <Chain>
8 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" /> 10 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" />
9 </Chain> 11 </Chain>
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt
deleted file mode 100644
index d30b2564..00000000
--- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt
+++ /dev/null
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.exe']" />
15</xsl:stylesheet>
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj
index f9926550..5475022c 100644
--- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj
+++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj
@@ -1,14 +1,6 @@
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. --> 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<Project Sdk="WixToolset.Sdk"> 2<Project Sdk="WixToolset.Sdk">
3 <ItemGroup> 3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.EarliestCoreMBA\trimmedscd" /> 4 <BindInputPaths Include="$(OutputPath)publish\Example.EarliestCoreMBA\trimmedscd" BindName="ba.payloads" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.EarliestCoreMBA\trimmedscd">
6 <DirectoryRefId>publish.Example.EarliestCoreMBA.trimmedscd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10
11 <ItemGroup>
12 <PackageReference Include="WixToolset.Heat" />
13 </ItemGroup> 5 </ItemGroup>
14</Project> 6</Project>
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
index bf4ad6e3..8895b279 100644
--- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
+++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
@@ -1,9 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> 2 <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication SourceFile="SourceDir\Example.EarliestCoreMBA.exe" > 3 <BootstrapperApplication SourceFile="!(bindpath.ba.payloads)\Example.EarliestCoreMBA.exe" >
4 <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> 4 <Payloads Include="!(bindpath.ba.payloads)\**">
5 <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> 5 <Exclude Files="!(bindpath.ba.payloads)\Example.EarliestCoreMBA.exe" />
6 </Payloads>
6 </BootstrapperApplication> 7 </BootstrapperApplication>
8
7 <Chain> 9 <Chain>
8 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" /> 10 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" />
9 </Chain> 11 </Chain>
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt
deleted file mode 100644
index d30b2564..00000000
--- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt
+++ /dev/null
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.exe']" />
15</xsl:stylesheet>
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj b/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj
index 048e3c97..73582984 100644
--- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj
+++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj
@@ -1,14 +1,6 @@
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. --> 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<Project Sdk="WixToolset.Sdk"> 2<Project Sdk="WixToolset.Sdk">
3 <ItemGroup> 3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.LatestCoreMBA\scd" /> 4 <BindInputPaths Include="$(OutputPath)publish\Example.LatestCoreMBA\scd" BindName="ba.payloads" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.LatestCoreMBA\scd">
6 <DirectoryRefId>publish.Example.LatestCoreMBA.scd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10
11 <ItemGroup>
12 <PackageReference Include="WixToolset.Heat" />
13 </ItemGroup> 5 </ItemGroup>
14</Project> 6</Project>
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs
index 0022b690..1f379b59 100644
--- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs
+++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs
@@ -1,9 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> 2 <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication SourceFile="Example.LatestCoreMBA.exe"> 3 <BootstrapperApplication SourceFile="!(bindpath.ba.payloads)\Example.LatestCoreMBA.exe">
4 <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> 4 <Payloads Include="!(bindpath.ba.payloads)\**">
5 <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> 5 <Exclude Files="!(bindpath.ba.payloads)\Example.LatestCoreMBA.exe" />
6 </Payloads>
6 </BootstrapperApplication> 7 </BootstrapperApplication>
8
7 <Chain> 9 <Chain>
8 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" /> 10 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" />
9 </Chain> 11 </Chain>
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt b/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt
deleted file mode 100644
index f606296e..00000000
--- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt
+++ /dev/null
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.exe']" />
15</xsl:stylesheet>
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj
index 056bf2bb..532f09b4 100644
--- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj
+++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj
@@ -1,14 +1,6 @@
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. --> 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<Project Sdk="WixToolset.Sdk"> 2<Project Sdk="WixToolset.Sdk">
3 <ItemGroup> 3 <ItemGroup>
4 <BindInputPaths Include="$(OutputPath)publish\Example.LatestCoreMBA\trimmedscd" /> 4 <BindInputPaths Include="$(OutputPath)publish\Example.LatestCoreMBA\trimmedscd" BindName="ba.payloads" />
5 <HarvestDirectory Include="$(OutputPath)publish\Example.LatestCoreMBA\trimmedscd">
6 <DirectoryRefId>publish.Example.LatestCoreMBA.trimmedscd</DirectoryRefId>
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10
11 <ItemGroup>
12 <PackageReference Include="WixToolset.Heat" />
13 </ItemGroup> 5 </ItemGroup>
14</Project> 6</Project>
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
index 322a27a3..cd32628a 100644
--- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
+++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs
@@ -1,9 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
2 <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> 2 <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533">
3 <BootstrapperApplication SourceFile="Example.LatestCoreMBA.exe"> 3 <BootstrapperApplication SourceFile="!(bindpath.ba.payloads)\Example.LatestCoreMBA.exe">
4 <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> 4 <Payloads Include="!(bindpath.ba.payloads)\**">
5 <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> 5 <Exclude Files="!(bindpath.ba.payloads)\Example.LatestCoreMBA.exe" />
6 </Payloads>
6 </BootstrapperApplication> 7 </BootstrapperApplication>
8
7 <Chain> 9 <Chain>
8 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" /> 10 <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" PerMachine="yes" />
9 </Chain> 11 </Chain>
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt
deleted file mode 100644
index f606296e..00000000
--- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt
+++ /dev/null
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.exe']" />
15</xsl:stylesheet>
diff --git a/src/ext/Bal/test/examples/examples.proj b/src/ext/Bal/test/examples/examples.proj
index c1544766..e439c288 100644
--- a/src/ext/Bal/test/examples/examples.proj
+++ b/src/ext/Bal/test/examples/examples.proj
@@ -34,16 +34,12 @@
34 Condition="'%(CoreMBAProject.SkipFDD)'==''" /> 34 Condition="'%(CoreMBAProject.SkipFDD)'==''" />
35 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"' 35 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\scd" -r win-x64 -c $(Configuration) --self-contained true "%(CoreMBAProject.Identity)"'
36 Condition="'%(CoreMBAProject.SkipSCD)'==''" /> 36 Condition="'%(CoreMBAProject.SkipSCD)'==''" />
37 <!--
38 Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535)
39 and is now a build error. This will go away when BAs go out of proc, so not spending a
40 lot of time to keep building trimmed in VS 17.8.
41 -->
42 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"' 37 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"'
43 Condition="'%(CoreMBAProject.TrimMode)'!=''" /> 38 Condition="'%(CoreMBAProject.TrimMode)'!=''" />
44 </Target> 39 </Target>
45 40
46 <ItemGroup> 41 <ItemGroup>
42 <ProjectReference Include="..\..\wixext\WixToolset.BootstrapperApplications.wixext.csproj" />
47 <ProjectReference Include="**\*.wixproj" /> 43 <ProjectReference Include="**\*.wixproj" />
48 </ItemGroup> 44 </ItemGroup>
49</Project> 45</Project>
diff --git a/src/test/burn/TestData/Manual/BundleB/Bundle.wxs b/src/test/burn/TestData/Manual/BundleB/Bundle.wxs
index 8c670577..248ec05c 100644
--- a/src/test/burn/TestData/Manual/BundleB/Bundle.wxs
+++ b/src/test/burn/TestData/Manual/BundleB/Bundle.wxs
@@ -30,11 +30,11 @@
30 <?elseif $(var.BA) = "hyperlinkLicense"?> 30 <?elseif $(var.BA) = "hyperlinkLicense"?>
31 <BootstrapperApplication> 31 <BootstrapperApplication>
32 <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" /> 32 <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" />
33 <PayloadGroupRef Id="BAPayloads" /> 33 <Payloads Include="$(sys.SOURCEFILEDIR)\BAPayloads\**" />
34 </BootstrapperApplication> 34 </BootstrapperApplication>
35 <?else?> 35 <?else?>
36 <BootstrapperApplicationRef Id="$(var.BA)"> 36 <BootstrapperApplicationRef Id="$(var.BA)">
37 <PayloadGroupRef Id="BAPayloads" /> 37 <Payloads Include="$(sys.SOURCEFILEDIR)\BAPayloads\**" />
38 </BootstrapperApplicationRef> 38 </BootstrapperApplicationRef>
39 <?endif?> 39 <?endif?>
40 40
diff --git a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
index 36792c2b..d0b05bc1 100644
--- a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
+++ b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
@@ -8,24 +8,10 @@
8 </PropertyGroup> 8 </PropertyGroup>
9 9
10 <ItemGroup> 10 <ItemGroup>
11 <HarvestDirectory Include="BAPayloads">
12 <ComponentGroupName>BAPayloads</ComponentGroupName>
13 <DirectoryRefId>BAPayloads</DirectoryRefId>
14 <Transforms>ba.xslt</Transforms>
15 </HarvestDirectory>
16 <HarvestDirectory Include="PackagePayloads">
17 <ComponentGroupName>PackagePayloads</ComponentGroupName>
18 <DirectoryRefId>PackagePayloads</DirectoryRefId>
19 <Transforms>package.xslt</Transforms>
20 </HarvestDirectory>
21 </ItemGroup>
22
23 <ItemGroup>
24 <ProjectReference Include="..\PackageA\PackageA.wixproj" /> 11 <ProjectReference Include="..\PackageA\PackageA.wixproj" />
25 </ItemGroup> 12 </ItemGroup>
26 13
27 <ItemGroup> 14 <ItemGroup>
28 <PackageReference Include="WixToolset.Heat" />
29 <PackageReference Include="WixToolset.BootstrapperApplications.wixext" /> 15 <PackageReference Include="WixToolset.BootstrapperApplications.wixext" />
30 </ItemGroup> 16 </ItemGroup>
31 17
diff --git a/src/test/burn/TestData/Manual/BundleB/BundleB.wxs b/src/test/burn/TestData/Manual/BundleB/BundleB.wxs
index 54082131..f1a04445 100644
--- a/src/test/burn/TestData/Manual/BundleB/BundleB.wxs
+++ b/src/test/burn/TestData/Manual/BundleB/BundleB.wxs
@@ -4,7 +4,7 @@
4 <Fragment> 4 <Fragment>
5 <PackageGroup Id="BundlePackages"> 5 <PackageGroup Id="BundlePackages">
6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)"> 6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)">
7 <PayloadGroupRef Id="PackagePayloads" /> 7 <Payloads Include="$(sys.SOURCEFILEDIR)\PackagePayloads\**" />
8 </MsiPackage> 8 </MsiPackage>
9 </PackageGroup> 9 </PackageGroup>
10 </Fragment> 10 </Fragment>
diff --git a/src/test/burn/TestData/Manual/BundleB/ba.xslt b/src/test/burn/TestData/Manual/BundleB/ba.xslt
deleted file mode 100644
index 54bc7fe6..00000000
--- a/src/test/burn/TestData/Manual/BundleB/ba.xslt
+++ /dev/null
@@ -1,21 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload" >
15 <xsl:copy>
16 <xsl:apply-templates select="@* | node()"/>
17 <xsl:attribute name="Id">ba_<xsl:value-of select="substring(@SourceFile, 11)" /></xsl:attribute>
18 <xsl:attribute name="SourceFile">BAPayloads<xsl:value-of select="substring(@SourceFile, 10)" /></xsl:attribute>
19 </xsl:copy>
20 </xsl:template>
21</xsl:stylesheet>
diff --git a/src/test/burn/TestData/Manual/BundleB/package.xslt b/src/test/burn/TestData/Manual/BundleB/package.xslt
deleted file mode 100644
index 304ff78b..00000000
--- a/src/test/burn/TestData/Manual/BundleB/package.xslt
+++ /dev/null
@@ -1,21 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3 xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
4 xmlns:wix="http://wixtoolset.org/schemas/v4/wxs"
5>
6 <xsl:output method="xml" indent="yes"/>
7
8 <xsl:template match="@* | node()">
9 <xsl:copy>
10 <xsl:apply-templates select="@* | node()"/>
11 </xsl:copy>
12 </xsl:template>
13
14 <xsl:template match="wix:Payload" >
15 <xsl:copy>
16 <xsl:apply-templates select="@* | node()"/>
17 <xsl:attribute name="Id">package_<xsl:value-of select="substring(@SourceFile, 11)" /></xsl:attribute>
18 <xsl:attribute name="SourceFile">PackagePayloads<xsl:value-of select="substring(@SourceFile, 10)" /></xsl:attribute>
19 </xsl:copy>
20 </xsl:template>
21</xsl:stylesheet>
diff --git a/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs
index f5a9781b..be337a60 100644
--- a/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs
+++ b/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs
@@ -58,6 +58,7 @@ namespace WixToolset.Core.Burn.Bind
58 switch (symbol.Definition.Type) 58 switch (symbol.Definition.Type)
59 { 59 {
60 // Symbols used internally and are not added to a data manifest. 60 // Symbols used internally and are not added to a data manifest.
61 case SymbolDefinitionType.HarvestPayloads:
61 case SymbolDefinitionType.ProvidesDependency: 62 case SymbolDefinitionType.ProvidesDependency:
62 case SymbolDefinitionType.WixApprovedExeForElevation: 63 case SymbolDefinitionType.WixApprovedExeForElevation:
63 case SymbolDefinitionType.WixBootstrapperApplication: 64 case SymbolDefinitionType.WixBootstrapperApplication:
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs
index 2efca5eb..21604ad5 100644
--- a/src/wix/WixToolset.Core/Compiler.cs
+++ b/src/wix/WixToolset.Core/Compiler.cs
@@ -5787,7 +5787,7 @@ namespace WixToolset.Core
5787 switch (child.Name.LocalName) 5787 switch (child.Name.LocalName)
5788 { 5788 {
5789 case "Exclude": 5789 case "Exclude":
5790 this.ParseFilesExcludeElement(child, exclusions); 5790 this.ParseFilesOrPayloadsExcludeElement(child, exclusions);
5791 break; 5791 break;
5792 default: 5792 default:
5793 this.Core.UnexpectedElement(node, child); 5793 this.Core.UnexpectedElement(node, child);
@@ -5833,7 +5833,7 @@ namespace WixToolset.Core
5833 }); 5833 });
5834 } 5834 }
5835 5835
5836 private void ParseFilesExcludeElement(XElement node, IList<string> paths) 5836 private void ParseFilesOrPayloadsExcludeElement(XElement node, IList<string> paths)
5837 { 5837 {
5838 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); 5838 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
5839 5839
diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs
index 14de99eb..49a729db 100644
--- a/src/wix/WixToolset.Core/Compiler_Bundle.cs
+++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs
@@ -364,6 +364,9 @@ namespace WixToolset.Core
364 case "PayloadGroupRef": 364 case "PayloadGroupRef":
365 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Layout, Compiler.BundleLayoutOnlyPayloads); 365 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Layout, Compiler.BundleLayoutOnlyPayloads);
366 break; 366 break;
367 case "Payloads":
368 this.ParsePayloadsElement(child, ComplexReferenceParentType.Layout, Compiler.BundleLayoutOnlyPayloads);
369 break;
367 case "RelatedBundle": 370 case "RelatedBundle":
368 this.ParseRelatedBundleElement(child); 371 this.ParseRelatedBundleElement(child);
369 break; 372 break;
@@ -694,15 +697,15 @@ namespace WixToolset.Core
694 this.Messaging.Write(CompilerErrors.AlreadyDefinedBootstrapperApplicationSource(childSourceLineNumbers, exePayloadSourceLineNumbers, exePayloadRefNode.Name.LocalName)); 697 this.Messaging.Write(CompilerErrors.AlreadyDefinedBootstrapperApplicationSource(childSourceLineNumbers, exePayloadSourceLineNumbers, exePayloadRefNode.Name.LocalName));
695 } 698 }
696 break; 699 break;
697
698 case "Payload": 700 case "Payload":
699 this.ParsePayloadElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId, isRemoteAllowed: false); 701 this.ParsePayloadElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId, isRemoteAllowed: false);
700 break; 702 break;
701
702 case "PayloadGroupRef": 703 case "PayloadGroupRef":
703 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId); 704 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId);
704 break; 705 break;
705 706 case "Payloads":
707 this.ParsePayloadsElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId);
708 break;
706 default: 709 default:
707 this.Core.UnexpectedElement(node, child); 710 this.Core.UnexpectedElement(node, child);
708 break; 711 break;
@@ -879,6 +882,9 @@ namespace WixToolset.Core
879 case "PayloadGroupRef": 882 case "PayloadGroupRef":
880 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId); 883 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId);
881 break; 884 break;
885 case "Payloads":
886 this.ParsePayloadsElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId);
887 break;
882 default: 888 default:
883 this.Core.UnexpectedElement(node, child); 889 this.Core.UnexpectedElement(node, child);
884 break; 890 break;
@@ -1264,6 +1270,9 @@ namespace WixToolset.Core
1264 case "PayloadGroupRef": 1270 case "PayloadGroupRef":
1265 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId); 1271 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId);
1266 break; 1272 break;
1273 case "Payloads":
1274 this.ParsePayloadsElement(child, ComplexReferenceParentType.Container, Compiler.BurnUXContainerId);
1275 break;
1267 default: 1276 default:
1268 this.Core.UnexpectedElement(node, child); 1277 this.Core.UnexpectedElement(node, child);
1269 break; 1278 break;
@@ -1560,6 +1569,9 @@ namespace WixToolset.Core
1560 case "PayloadGroupRef": 1569 case "PayloadGroupRef":
1561 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.PayloadGroup, id); 1570 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.PayloadGroup, id);
1562 break; 1571 break;
1572 case "Payloads":
1573 this.ParsePayloadsElement(child, ComplexReferenceParentType.PayloadGroup, id);
1574 break;
1563 default: 1575 default:
1564 this.Core.UnexpectedElement(node, child); 1576 this.Core.UnexpectedElement(node, child);
1565 break; 1577 break;
@@ -1633,6 +1645,80 @@ namespace WixToolset.Core
1633 } 1645 }
1634 1646
1635 /// <summary> 1647 /// <summary>
1648 /// Parses a payloads harvesting element.
1649 /// </summary>
1650 /// <param name="node">Element to parse.</param>
1651 /// <param name="parentType">ComplexReferenceParentType of parent element (BA or PayloadGroup).</param>
1652 /// <param name="parentId">Identifier of parent element.</param>
1653 private void ParsePayloadsElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId)
1654 {
1655 var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1656 var win64 = this.Context.IsCurrentPlatform64Bit;
1657 var inclusions = new List<string>();
1658 var exclusions = new List<string>();
1659
1660 foreach (var attrib in node.Attributes())
1661 {
1662 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || CompilerCore.WixNamespace == attrib.Name.Namespace)
1663 {
1664 switch (attrib.Name.LocalName)
1665 {
1666 case "Include":
1667 inclusions.AddRange(this.Core.GetAttributeValue(sourceLineNumbers, attrib).Split(';'));
1668 break;
1669 default:
1670 this.Core.UnexpectedAttribute(node, attrib);
1671 break;
1672 }
1673 }
1674 else
1675 {
1676 var context = new Dictionary<string, string>() { { "Win64", win64.ToString() } };
1677 this.Core.ParseExtensionAttribute(node, attrib, context);
1678 }
1679 }
1680
1681 foreach (var child in node.Elements())
1682 {
1683 if (CompilerCore.WixNamespace == child.Name.Namespace)
1684 {
1685 switch (child.Name.LocalName)
1686 {
1687 case "Exclude":
1688 this.ParseFilesOrPayloadsExcludeElement(child, exclusions);
1689 break;
1690 default:
1691 this.Core.UnexpectedElement(node, child);
1692 break;
1693 }
1694 }
1695 else
1696 {
1697 var context = new Dictionary<string, string>() { { "Win64", win64.ToString() } };
1698 this.Core.ParseExtensionElement(node, child, context);
1699 }
1700 }
1701
1702 if (!inclusions.Any())
1703 {
1704 this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Include"));
1705 }
1706
1707 var inclusionsAsString = String.Join(";", inclusions);
1708 var exclusionsAsString = String.Join(";", exclusions);
1709
1710 var id = this.Core.CreateIdentifier("hvp", parentId.Id, inclusionsAsString, exclusionsAsString);
1711
1712 this.Core.AddSymbol(new HarvestPayloadsSymbol(sourceLineNumbers, id)
1713 {
1714 Inclusions = inclusionsAsString,
1715 Exclusions = exclusionsAsString,
1716 ComplexReferenceParentType = parentType.ToString(),
1717 ParentId = parentId.Id,
1718 });
1719 }
1720
1721 /// <summary>
1636 /// Parse ExitCode element. 1722 /// Parse ExitCode element.
1637 /// </summary> 1723 /// </summary>
1638 /// <param name="node">Element to parse</param> 1724 /// <param name="node">Element to parse</param>
@@ -2279,6 +2365,9 @@ namespace WixToolset.Core
2279 case "PayloadGroupRef": 2365 case "PayloadGroupRef":
2280 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Package, id); 2366 this.ParsePayloadGroupRefElement(child, ComplexReferenceParentType.Package, id);
2281 break; 2367 break;
2368 case "Payloads":
2369 this.ParsePayloadsElement(child, ComplexReferenceParentType.Package, id);
2370 break;
2282 case "Provides": 2371 case "Provides":
2283 this.ParseProvidesElement(child, packageType, id.Id, out _); 2372 this.ParseProvidesElement(child, packageType, id.Id, out _);
2284 break; 2373 break;
diff --git a/src/wix/WixToolset.Core/HarvestFilesCommand.cs b/src/wix/WixToolset.Core/HarvestFilesAndPayloadsCommand.cs
index 33c38589..3b1b1358 100644
--- a/src/wix/WixToolset.Core/HarvestFilesCommand.cs
+++ b/src/wix/WixToolset.Core/HarvestFilesAndPayloadsCommand.cs
@@ -11,11 +11,11 @@ namespace WixToolset.Core
11 using WixToolset.Extensibility.Data; 11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services; 12 using WixToolset.Extensibility.Services;
13 13
14 internal class HarvestFilesCommand 14 internal class HarvestFilesAndPayloadsCommand
15 { 15 {
16 private const string BindPathOpenString = "!(bindpath."; 16 private const string BindPathOpenString = "!(bindpath.";
17 17
18 public HarvestFilesCommand(IOptimizeContext context) 18 public HarvestFilesAndPayloadsCommand(IOptimizeContext context)
19 { 19 {
20 this.Context = context; 20 this.Context = context;
21 this.Messaging = this.Context.ServiceProvider.GetService<IMessaging>(); 21 this.Messaging = this.Context.ServiceProvider.GetService<IMessaging>();
@@ -31,6 +31,7 @@ namespace WixToolset.Core
31 internal void Execute() 31 internal void Execute()
32 { 32 {
33 var harvestedFiles = new HashSet<string>(); 33 var harvestedFiles = new HashSet<string>();
34 var harvestedPayloads = new HashSet<string>();
34 35
35 foreach (var section in this.Context.Intermediates.SelectMany(i => i.Sections)) 36 foreach (var section in this.Context.Intermediates.SelectMany(i => i.Sections))
36 { 37 {
@@ -39,6 +40,14 @@ namespace WixToolset.Core
39 this.HarvestFiles(harvestFiles, section, harvestedFiles); 40 this.HarvestFiles(harvestFiles, section, harvestedFiles);
40 } 41 }
41 } 42 }
43
44 foreach (var section in this.Context.Intermediates.SelectMany(i => i.Sections))
45 {
46 foreach (var harvestPayloads in section.Symbols.OfType<HarvestPayloadsSymbol>().ToList())
47 {
48 this.HarvestPayloads(harvestPayloads, section, harvestedPayloads);
49 }
50 }
42 } 51 }
43 52
44 private void HarvestFiles(HarvestFilesSymbol harvestFile, IntermediateSection section, ISet<string> harvestedFiles) 53 private void HarvestFiles(HarvestFilesSymbol harvestFile, IntermediateSection section, ISet<string> harvestedFiles)
@@ -52,8 +61,8 @@ namespace WixToolset.Core
52 61
53 var resolvedFiles = Enumerable.Empty<WildcardFile>(); 62 var resolvedFiles = Enumerable.Empty<WildcardFile>();
54 63
55 var included = this.GetWildcardFiles(harvestFile, inclusions); 64 var included = this.GetWildcardFiles(inclusions, harvestFile.SourceLineNumbers, harvestFile.SourcePath);
56 var excluded = this.GetWildcardFiles(harvestFile, exclusions); 65 var excluded = this.GetWildcardFiles(exclusions, harvestFile.SourceLineNumbers, harvestFile.SourcePath);
57 66
58 foreach (var excludedFile in excluded) 67 foreach (var excludedFile in excluded)
59 { 68 {
@@ -128,10 +137,70 @@ namespace WixToolset.Core
128 } 137 }
129 } 138 }
130 139
131 private IEnumerable<WildcardFile> GetWildcardFiles(HarvestFilesSymbol harvestFile, IEnumerable<string> patterns) 140 private void HarvestPayloads(HarvestPayloadsSymbol harvestPayload, IntermediateSection section, HashSet<string> harvestedPayloads)
141 {
142 var sourceLineNumbers = harvestPayload.SourceLineNumbers;
143 var inclusions = harvestPayload.Inclusions.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
144 var exclusions = harvestPayload.Exclusions.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
145
146 var comparer = new WildcardFileComparer();
147
148 var resolvedFiles = Enumerable.Empty<WildcardFile>();
149
150 var included = this.GetWildcardFiles(inclusions, sourceLineNumbers);
151 var excluded = this.GetWildcardFiles(exclusions, sourceLineNumbers);
152
153 foreach (var excludedFile in excluded)
154 {
155 this.Messaging.Write(OptimizerVerboses.ExcludedFile(sourceLineNumbers, excludedFile.Path));
156 }
157
158 resolvedFiles = included.Except(excluded, comparer).ToList();
159
160 if (!resolvedFiles.Any())
161 {
162 this.Messaging.Write(OptimizerWarnings.ZeroFilesHarvested(sourceLineNumbers));
163 }
164
165 foreach (var payloadByRecursiveDir in resolvedFiles.GroupBy(resolvedFile => resolvedFile.RecursiveDir, resolvedFile => resolvedFile.Path))
166 {
167 var recursiveDir = payloadByRecursiveDir.Key;
168
169 foreach (var file in payloadByRecursiveDir)
170 {
171 if (harvestedPayloads.Add(file))
172 {
173 var name = Path.GetFileName(file);
174
175 var id = this.ParseHelper.CreateIdentifier("pld", harvestPayload.ParentId, recursiveDir.ToUpperInvariant(), name.ToUpperInvariant());
176
177 this.Messaging.Write(OptimizerVerboses.HarvestedFile(sourceLineNumbers, file));
178
179 section.AddSymbol(new WixBundlePayloadSymbol(sourceLineNumbers, id)
180 {
181 Name = Path.Combine(recursiveDir, name),
182 SourceFile = new IntermediateFieldPathValue { Path = file },
183 Compressed = null,
184 UnresolvedSourceFile = file, // duplicate of sourceFile but in a string column so it won't get resolved to a full path during binding.
185 });
186
187 if (Enum.TryParse<ComplexReferenceParentType>(harvestPayload.ComplexReferenceParentType, out var parentType)
188 && ComplexReferenceParentType.Unknown != parentType && null != harvestPayload.ParentId)
189 {
190 this.ParseHelper.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, harvestPayload.ParentId, ComplexReferenceChildType.Payload, id.Id);
191 }
192 }
193 else
194 {
195 this.Messaging.Write(OptimizerWarnings.SkippingDuplicateFile(sourceLineNumbers, file));
196 }
197 }
198 }
199 }
200
201 private IEnumerable<WildcardFile> GetWildcardFiles(IEnumerable<string> patterns, SourceLineNumber sourceLineNumbers, string sourcePath = null)
132 { 202 {
133 var sourceLineNumbers = harvestFile.SourceLineNumbers; 203 sourcePath = sourcePath?.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
134 var sourcePath = harvestFile.SourcePath?.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
135 204
136 var files = new List<WildcardFile>(); 205 var files = new List<WildcardFile>();
137 206
@@ -177,7 +246,7 @@ namespace WixToolset.Core
177 } 246 }
178 catch (DirectoryNotFoundException e) 247 catch (DirectoryNotFoundException e)
179 { 248 {
180 this.Messaging.Write(OptimizerWarnings.ExpectedDirectory(harvestFile.SourceLineNumbers, e.Message)); 249 this.Messaging.Write(OptimizerWarnings.ExpectedDirectory(sourceLineNumbers, e.Message));
181 } 250 }
182 } 251 }
183 } 252 }
diff --git a/src/wix/WixToolset.Core/Optimizer.cs b/src/wix/WixToolset.Core/Optimizer.cs
index 33f757a3..89b723e8 100644
--- a/src/wix/WixToolset.Core/Optimizer.cs
+++ b/src/wix/WixToolset.Core/Optimizer.cs
@@ -26,7 +26,7 @@ namespace WixToolset.Core
26 } 26 }
27 27
28 { 28 {
29 var command = new HarvestFilesCommand(context); 29 var command = new HarvestFilesAndPayloadsCommand(context);
30 command.Execute(); 30 command.Execute();
31 } 31 }
32 32
diff --git a/src/wix/WixToolset.Core/OptimizerWarnings.cs b/src/wix/WixToolset.Core/OptimizerWarnings.cs
index 784dc587..616883f4 100644
--- a/src/wix/WixToolset.Core/OptimizerWarnings.cs
+++ b/src/wix/WixToolset.Core/OptimizerWarnings.cs
@@ -8,7 +8,7 @@ namespace WixToolset.Core
8 { 8 {
9 public static Message ZeroFilesHarvested(SourceLineNumber sourceLineNumbers) 9 public static Message ZeroFilesHarvested(SourceLineNumber sourceLineNumbers)
10 { 10 {
11 return Message(sourceLineNumbers, Ids.ZeroFilesHarvested, "Files inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify your Files paths, inclusions, and exclusions for accuracy."); 11 return Message(sourceLineNumbers, Ids.ZeroFilesHarvested, "Inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify paths, inclusions, and exclusions on Files or Payloads for accuracy.");
12 } 12 }
13 13
14 public static Message ExpectedDirectory(SourceLineNumber sourceLineNumbers, string harvestDirectory) 14 public static Message ExpectedDirectory(SourceLineNumber sourceLineNumbers, string harvestDirectory)
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
index 323b5eb0..30d3aaea 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
@@ -9,6 +9,7 @@ namespace WixToolsetTest.CoreIntegration
9 using WixInternal.TestSupport; 9 using WixInternal.TestSupport;
10 using WixInternal.Core.TestPackage; 10 using WixInternal.Core.TestPackage;
11 using Xunit; 11 using Xunit;
12 using System.Linq;
12 13
13 public class BundleManifestFixture 14 public class BundleManifestFixture
14 { 15 {
@@ -133,13 +134,13 @@ namespace WixToolsetTest.CoreIntegration
133 { 134 {
134 { "WixPayloadProperties", new List<string> { "Size" } }, 135 { "WixPayloadProperties", new List<string> { "Size" } },
135 }; 136 };
136 var payloadElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPayloadProperties", ignoreAttributesByElementName); 137 var payloadElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPayloadProperties", ignoreAttributesByElementName).OrderBy(line => line).ToArray();
137 WixAssert.CompareLineByLine(new[] 138 WixAssert.CompareLineByLine(new[]
138 { 139 {
139 "<WixPayloadProperties Package='credwiz.exe' Payload='SourceFilePayload' Container='WixAttachedContainer' Name='SharedPayloadsBetweenPackages.wxs' Size='*' />",
140 "<WixPayloadProperties Package='credwiz.exe' Payload='credwiz.exe' Container='WixAttachedContainer' Name='credwiz.exe' Size='*' />", 140 "<WixPayloadProperties Package='credwiz.exe' Payload='credwiz.exe' Container='WixAttachedContainer' Name='credwiz.exe' Size='*' />",
141 "<WixPayloadProperties Package='cscript.exe' Payload='SourceFilePayload' Container='WixAttachedContainer' Name='SharedPayloadsBetweenPackages.wxs' Size='*' />", 141 "<WixPayloadProperties Package='credwiz.exe' Payload='pldbF0sgj0VCScDauGEpgwmywekS84' Container='WixAttachedContainer' Name='SharedPayloadsBetweenPackages.wxs' Size='*' />",
142 "<WixPayloadProperties Package='cscript.exe' Payload='cscript.exe' Container='WixAttachedContainer' Name='cscript.exe' Size='*' />", 142 "<WixPayloadProperties Package='cscript.exe' Payload='cscript.exe' Container='WixAttachedContainer' Name='cscript.exe' Size='*' />",
143 "<WixPayloadProperties Package='cscript.exe' Payload='pldbF0sgj0VCScDauGEpgwmywekS84' Container='WixAttachedContainer' Name='SharedPayloadsBetweenPackages.wxs' Size='*' />",
143 }, payloadElements); 144 }, payloadElements);
144 } 145 }
145 } 146 }
@@ -380,8 +381,8 @@ namespace WixToolsetTest.CoreIntegration
380 var exePackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributesByElementName); 381 var exePackageElements = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:Chain/burn:ExePackage", ignoreAttributesByElementName);
381 WixAssert.CompareLineByLine(new[] 382 WixAssert.CompareLineByLine(new[]
382 { 383 {
383 "<ExePackage Id='credwiz.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_credwiz.exe' RollbackLogPathVariable='WixBundleRollbackLog_credwiz.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='-foo' Uninstallable='yes' Protocol='burn' Bundle='yes'><PayloadRef Id='credwiz.exe' /><PayloadRef Id='SourceFilePayload' /></ExePackage>", 384 "<ExePackage Id='credwiz.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryForward='WixDefaultBoundary' LogPathVariable='WixBundleLog_credwiz.exe' RollbackLogPathVariable='WixBundleRollbackLog_credwiz.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='-foo' Uninstallable='yes' Protocol='burn' Bundle='yes'><PayloadRef Id='credwiz.exe' /><PayloadRef Id='pldbF0sgj0VCScDauGEpgwmywekS84' /></ExePackage>",
384 "<ExePackage Id='cscript.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_cscript.exe' RollbackLogPathVariable='WixBundleRollbackLog_cscript.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='' Uninstallable='yes' Protocol='none' Bundle='yes'><PayloadRef Id='cscript.exe' /><PayloadRef Id='SourceFilePayload' /></ExePackage>", 385 "<ExePackage Id='cscript.exe' Cache='keep' CacheId='*' InstallSize='*' Size='*' PerMachine='yes' Permanent='yes' Vital='yes' RollbackBoundaryBackward='WixDefaultBoundary' LogPathVariable='WixBundleLog_cscript.exe' RollbackLogPathVariable='WixBundleRollbackLog_cscript.exe' InstallArguments='' RepairArguments='' Repairable='no' DetectionType='condition' DetectCondition='none' UninstallArguments='' Uninstallable='yes' Protocol='none' Bundle='yes'><PayloadRef Id='cscript.exe' /><PayloadRef Id='pldbF0sgj0VCScDauGEpgwmywekS84' /></ExePackage>",
385 }, exePackageElements); 386 }, exePackageElements);
386 } 387 }
387 } 388 }
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/HarvestFilesFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/HarvestFilesFixture.cs
index b407bb86..97f3e442 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/HarvestFilesFixture.cs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/HarvestFilesFixture.cs
@@ -35,7 +35,7 @@ namespace WixToolsetTest.CoreIntegration
35 var messages = result.Messages.Select(m => FormatMessage(m, sourceFolder, baseFolder)).ToArray(); 35 var messages = result.Messages.Select(m => FormatMessage(m, sourceFolder, baseFolder)).ToArray();
36 WixAssert.CompareLineByLine(new[] 36 WixAssert.CompareLineByLine(new[]
37 { 37 {
38 "8600: Files inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify your Files paths, inclusions, and exclusions for accuracy.", 38 "8600: Inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify paths, inclusions, and exclusions on Files or Payloads for accuracy.",
39 }, messages); 39 }, messages);
40 }); 40 });
41 } 41 }
@@ -49,9 +49,9 @@ namespace WixToolsetTest.CoreIntegration
49 WixAssert.CompareLineByLine(new[] 49 WixAssert.CompareLineByLine(new[]
50 { 50 {
51 @"8601: Missing directory for harvesting files: Could not find a part of the path '<sourceFolder>\files2\MissingDirectory'.", 51 @"8601: Missing directory for harvesting files: Could not find a part of the path '<sourceFolder>\files2\MissingDirectory'.",
52 @"8600: Files inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify your Files paths, inclusions, and exclusions for accuracy.", 52 @"8600: Inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify paths, inclusions, and exclusions on Files or Payloads for accuracy.",
53 @"8601: Missing directory for harvesting files: Could not find a part of the path '<sourceFolder>\files2\ThisDirectoryIsAlsoMissing'.", 53 @"8601: Missing directory for harvesting files: Could not find a part of the path '<sourceFolder>\files2\ThisDirectoryIsAlsoMissing'.",
54 @"8600: Files inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify your Files paths, inclusions, and exclusions for accuracy.", 54 @"8600: Inclusions and exclusions resulted in zero files harvested. Unless that is expected, you should verify paths, inclusions, and exclusions on Files or Payloads for accuracy.",
55 }, messages); 55 }, messages);
56 }); 56 });
57 } 57 }
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SharedPayloadsBetweenPackages/SharedPayloadsBetweenPackages.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SharedPayloadsBetweenPackages/SharedPayloadsBetweenPackages.wxs
index 55f9d110..96148c6c 100644
--- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SharedPayloadsBetweenPackages/SharedPayloadsBetweenPackages.wxs
+++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/SharedPayloadsBetweenPackages/SharedPayloadsBetweenPackages.wxs
@@ -10,9 +10,10 @@
10 </ExePackage> 10 </ExePackage>
11 </PackageGroup> 11 </PackageGroup>
12 </Fragment> 12 </Fragment>
13
13 <Fragment> 14 <Fragment>
14 <PayloadGroup Id="SharedPayloads"> 15 <PayloadGroup Id="SharedPayloads">
15 <Payload Id="SourceFilePayload" SourceFile="$(sys.SOURCEFILEPATH)" /> 16 <Payloads Include="$(sys.SOURCEFILEDIR)\**" />
16 </PayloadGroup> 17 </PayloadGroup>
17 </Fragment> 18 </Fragment>
18</Wix> 19</Wix>
diff --git a/src/xsd/wix.xsd b/src/xsd/wix.xsd
index 8cf81048..d72d8e69 100644
--- a/src/xsd/wix.xsd
+++ b/src/xsd/wix.xsd
@@ -87,6 +87,7 @@
87 <xs:element ref="Log" minOccurs="0" maxOccurs="1" /> 87 <xs:element ref="Log" minOccurs="0" maxOccurs="1" />
88 <xs:element ref="PayloadGroup" /> 88 <xs:element ref="PayloadGroup" />
89 <xs:element ref="PayloadGroupRef" /> 89 <xs:element ref="PayloadGroupRef" />
90 <xs:element ref="Payloads" />
90 <xs:element ref="RelatedBundle" /> 91 <xs:element ref="RelatedBundle" />
91 <xs:element ref="Requires" /> 92 <xs:element ref="Requires" />
92 <xs:element ref="SetVariable" /> 93 <xs:element ref="SetVariable" />
@@ -462,6 +463,7 @@
462 <xs:element ref="BootstrapperApplicationDll" minOccurs="0" maxOccurs="1" /> 463 <xs:element ref="BootstrapperApplicationDll" minOccurs="0" maxOccurs="1" />
463 <xs:element ref="Payload" /> 464 <xs:element ref="Payload" />
464 <xs:element ref="PayloadGroupRef" /> 465 <xs:element ref="PayloadGroupRef" />
466 <xs:element ref="Payloads" />
465 <xs:any namespace="##other" processContents="lax"> 467 <xs:any namespace="##other" processContents="lax">
466 <xs:annotation> 468 <xs:annotation>
467 <xs:documentation> 469 <xs:documentation>
@@ -524,6 +526,7 @@
524 <xs:choice minOccurs="0" maxOccurs="unbounded"> 526 <xs:choice minOccurs="0" maxOccurs="unbounded">
525 <xs:element ref="Payload" /> 527 <xs:element ref="Payload" />
526 <xs:element ref="PayloadGroupRef" /> 528 <xs:element ref="PayloadGroupRef" />
529 <xs:element ref="Payloads" />
527 <xs:any namespace="##other" processContents="lax"> 530 <xs:any namespace="##other" processContents="lax">
528 <xs:annotation> 531 <xs:annotation>
529 <xs:documentation> 532 <xs:documentation>
@@ -666,6 +669,7 @@
666 <xs:choice minOccurs="0" maxOccurs="unbounded"> 669 <xs:choice minOccurs="0" maxOccurs="unbounded">
667 <xs:element ref="Payload" /> 670 <xs:element ref="Payload" />
668 <xs:element ref="PayloadGroupRef" /> 671 <xs:element ref="PayloadGroupRef" />
672 <xs:element ref="Payloads" />
669 <xs:any namespace="##other" processContents="lax"> 673 <xs:any namespace="##other" processContents="lax">
670 <xs:annotation> 674 <xs:annotation>
671 <xs:documentation> 675 <xs:documentation>
@@ -934,6 +938,7 @@
934 <xs:element ref="SlipstreamMsp" /> 938 <xs:element ref="SlipstreamMsp" />
935 <xs:element ref="Payload" /> 939 <xs:element ref="Payload" />
936 <xs:element ref="PayloadGroupRef" /> 940 <xs:element ref="PayloadGroupRef" />
941 <xs:element ref="Payloads" />
937 <xs:element ref="MsiPackagePayload" /> 942 <xs:element ref="MsiPackagePayload" />
938 <xs:element ref="Provides" /> 943 <xs:element ref="Provides" />
939 <xs:any namespace="##other" processContents="lax"> 944 <xs:any namespace="##other" processContents="lax">
@@ -998,6 +1003,7 @@
998 <xs:element ref="MsiProperty" /> 1003 <xs:element ref="MsiProperty" />
999 <xs:element ref="Payload" /> 1004 <xs:element ref="Payload" />
1000 <xs:element ref="PayloadGroupRef" /> 1005 <xs:element ref="PayloadGroupRef" />
1006 <xs:element ref="Payloads" />
1001 <xs:element ref="MspPackagePayload" /> 1007 <xs:element ref="MspPackagePayload" />
1002 <xs:element ref="Provides" /> 1008 <xs:element ref="Provides" />
1003 <xs:any namespace="##other" processContents="lax"> 1009 <xs:any namespace="##other" processContents="lax">
@@ -1045,6 +1051,7 @@
1045 <xs:choice minOccurs="0" maxOccurs="unbounded"> 1051 <xs:choice minOccurs="0" maxOccurs="unbounded">
1046 <xs:element ref="Payload" /> 1052 <xs:element ref="Payload" />
1047 <xs:element ref="PayloadGroupRef" /> 1053 <xs:element ref="PayloadGroupRef" />
1054 <xs:element ref="Payloads" />
1048 <xs:element ref="MsuPackagePayload" /> 1055 <xs:element ref="MsuPackagePayload" />
1049 <xs:element ref="Provides" /> 1056 <xs:element ref="Provides" />
1050 <xs:any namespace="##other" processContents="lax"> 1057 <xs:any namespace="##other" processContents="lax">
@@ -1081,6 +1088,7 @@
1081 <xs:choice minOccurs="0" maxOccurs="unbounded"> 1088 <xs:choice minOccurs="0" maxOccurs="unbounded">
1082 <xs:element ref="Payload" /> 1089 <xs:element ref="Payload" />
1083 <xs:element ref="PayloadGroupRef" /> 1090 <xs:element ref="PayloadGroupRef" />
1091 <xs:element ref="Payloads" />
1084 <xs:element ref="ExePackagePayload" /> 1092 <xs:element ref="ExePackagePayload" />
1085 <xs:element ref="ExitCode" /> 1093 <xs:element ref="ExitCode" />
1086 <xs:element ref="CommandLine" /> 1094 <xs:element ref="CommandLine" />
@@ -1169,6 +1177,7 @@
1169 <xs:choice minOccurs="0" maxOccurs="unbounded"> 1177 <xs:choice minOccurs="0" maxOccurs="unbounded">
1170 <xs:element ref="Payload" /> 1178 <xs:element ref="Payload" />
1171 <xs:element ref="PayloadGroupRef" /> 1179 <xs:element ref="PayloadGroupRef" />
1180 <xs:element ref="Payloads" />
1172 <xs:element ref="BundlePackagePayload" /> 1181 <xs:element ref="BundlePackagePayload" />
1173 <xs:element ref="ExitCode" /> 1182 <xs:element ref="ExitCode" />
1174 <xs:element ref="CommandLine" /> 1183 <xs:element ref="CommandLine" />
@@ -1930,6 +1939,7 @@
1930 <xs:element ref="MsuPackagePayload" /> 1939 <xs:element ref="MsuPackagePayload" />
1931 <xs:element ref="Payload" /> 1940 <xs:element ref="Payload" />
1932 <xs:element ref="PayloadGroupRef" /> 1941 <xs:element ref="PayloadGroupRef" />
1942 <xs:element ref="Payloads" />
1933 </xs:choice> 1943 </xs:choice>
1934 <xs:attribute name="Id" type="xs:string" use="required"> 1944 <xs:attribute name="Id" type="xs:string" use="required">
1935 <xs:annotation> 1945 <xs:annotation>
@@ -8973,6 +8983,54 @@
8973 </xs:anyAttribute> 8983 </xs:anyAttribute>
8974 </xs:complexType> 8984 </xs:complexType>
8975 </xs:element> 8985 </xs:element>
8986 <xs:element name="Payloads">
8987 <xs:annotation>
8988 <xs:documentation>
8989 Authoring to define the set of files to be harvested for inclusion in a bundle.
8990 </xs:documentation>
8991 </xs:annotation>
8992 <xs:complexType>
8993 <xs:choice minOccurs="0" maxOccurs="unbounded">
8994 <xs:element ref="Exclude" />
8995 <xs:any namespace="##other" processContents="lax">
8996 <xs:annotation>
8997 <xs:documentation>
8998 Extensibility point in the WiX XML Schema. Schema extensions can register additional
8999 elements at this point in the schema.
9000 </xs:documentation>
9001 </xs:annotation>
9002 </xs:any>
9003 </xs:choice>
9004 <xs:attribute name="Include" type="xs:string" use="required">
9005 <xs:annotation>
9006 <xs:documentation>
9007 A file-selection pattern that can include directory names, file names, and wildcards.
9008 If a pattern is not an absolute path (via a preprocessor variable, unnamed bind path,
9009 or named bind path), it is interpreted as relative to the directory containing the
9010 source file. Absolute paths via a named bind path are recommended.
9011
9012 Wildcards include typical `*.ext` globs and MSBuild-style `**` globs to indicate
9013 that directories should be recursed. Examples include:
9014
9015 | Pattern | Description |
9016 | ------- | ----------- |
9017 | `!(bindpath.ToBeHarvested)\**` | All files in the parent directory identified by the `ToBeHarvested` bind path and its subdirectories. |
9018 | `$(PayloadFiles)\bin\Release\**` | All files in the `bin\Release` subdirectory in the directory named by the `PayloadFiles` preprocessor variable and its subdirectories. |
9019 | `!(bindpath.arm64)\**.pdb` | All files with `.pdb` extension in the parent directory identified by the `arm64` bind path and its subdirectories. |
9020 | `**` | If an unnamed bind path was specified, all files in that directory and its subdirectories. If an unnamed bind path was _not_ specified, all files in directory of the source .wxs file and its subdirectories. |
9021 </xs:documentation>
9022 </xs:annotation>
9023 </xs:attribute>
9024 <xs:anyAttribute namespace="##other" processContents="lax">
9025 <xs:annotation>
9026 <xs:documentation>
9027 Extensibility point in the WiX XML Schema. Schema extensions can register additional
9028 attributes at this point in the schema.
9029 </xs:documentation>
9030 </xs:annotation>
9031 </xs:anyAttribute>
9032 </xs:complexType>
9033 </xs:element>
8976 <xs:element name="Files"> 9034 <xs:element name="Files">
8977 <xs:annotation> 9035 <xs:annotation>
8978 <xs:documentation> 9036 <xs:documentation>
@@ -9040,7 +9098,7 @@
9040 <xs:element name="Exclude"> 9098 <xs:element name="Exclude">
9041 <xs:annotation> 9099 <xs:annotation>
9042 <xs:documentation> 9100 <xs:documentation>
9043 Using wildcards, defines the files from a parent `Files` element that should be excluded from harvesting. 9101 Using wildcards, defines the files from a parent `Files` or `Payloads` element that should be excluded from harvesting.
9044 </xs:documentation> 9102 </xs:documentation>
9045 </xs:annotation> 9103 </xs:annotation>
9046 <xs:complexType> 9104 <xs:complexType>
@@ -9057,7 +9115,7 @@
9057 <xs:attribute name="Files" type="xs:string" use="required"> 9115 <xs:attribute name="Files" type="xs:string" use="required">
9058 <xs:annotation> 9116 <xs:annotation>
9059 <xs:documentation> 9117 <xs:documentation>
9060 Excludes files from the set of files harvested via the parent `Files` element. 9118 Excludes files from the set of files harvested via the parent `Files` or `Payloads` element.
9061 Inclusion and exclusion wildcards must match paths. For example, if you have a 9119 Inclusion and exclusion wildcards must match paths. For example, if you have a
9062 `Files` element with `Include="!(bindpath.ToBeHarvested)\**"` and want to 9120 `Files` element with `Include="!(bindpath.ToBeHarvested)\**"` and want to
9063 exclude one of the files, use an `Exclude` element with a `Files` attribute 9121 exclude one of the files, use an `Exclude` element with a `Files` attribute