Perform more bundle validation during linking.
#5273, #6291, #6398
Sean Hall committed
Apr 24, 2021 at 16:28 UTC
f4709371fa21ca1d0c06e04d1b53c0b10bfafeed
24 files changed
+492
-115
src/WixToolset.Core.Burn/BurnBackendErrors.cs
+1
-1
@@ -67,6 +67,6 @@ namespace WixToolset.Core.Burn
67
PackageCachePayloadCollision = 8006,
68
PackageCachePayloadCollision2 = 8007,
69
MultipleAttachedContainersUnsupported = 8008,
70
- }
70
+ } // last available is 8499. 8500 is BurnBackendWarnings.
71
}
72
}
src/WixToolset.Core.Burn/BurnBackendWarnings.cs
+1
-1
@@ -31,6 +31,6 @@ namespace WixToolset.Core.Burn
31
AttachedContainerPayloadCollision = 8500,
32
AttachedContainerPayloadCollision2 = 8501,
33
EmptyContainer = 8502,
34
- }
34
+ } // last available is 8999. 9000 is VerboseMessages.
35
}
36
}
src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendErrors.cs
+2
-2
@@ -18,7 +18,7 @@ namespace WixToolset.Core.WindowsInstaller
18
19
public enum Ids
20
{
21
- // ReplaceThisWithTheFirstError = 7000,
22
- }
21
+ // ReplaceThisWithTheFirstError = 7500,
22
+ } // last available is 7999. 8000 is BurnBackendErrors.
23
}
24
}
src/WixToolset.Core.WindowsInstaller/WindowsInstallerBackendWarnings.cs
+2
-2
@@ -18,7 +18,7 @@ namespace WixToolset.Core.WindowsInstaller
18
19
public enum Ids
20
{
21
- // ReplaceThisWithTheFirstWarning = 7500,
22
- }
21
+ // ReplaceThisWithTheFirstWarning = 7100,
22
+ } // last available is 7499. 7500 is WindowsInstallerBackendErrors.
23
}
24
}
src/WixToolset.Core/CompilerErrors.cs
+1
-1
@@ -38,6 +38,6 @@ namespace WixToolset.Core
38
39
IllegalName = 6601,
40
ExampleRegid = 6602,
41
- }
41
+ } // 5400-5499 and 6600-6699 were the ranges for Dependency and Tag which are now in Core between CompilerWarnings and CompilerErrors.
42
}
43
}
src/WixToolset.Core/CompilerWarnings.cs
+1
-1
@@ -60,6 +60,6 @@ namespace WixToolset.Core
60
Win64Component = 5435,
61
DirectoryRefStandardDirectoryDeprecated = 5436,
62
DefiningStandardDirectoryDeprecated = 5437,
63
- }
63
+ } // 5400-5499 and 6600-6699 were the ranges for Dependency and Tag which are now in Core between CompilerWarnings and CompilerErrors.
64
}
65
}
src/WixToolset.Core/Compiler_Bundle.cs
+1
@@ -2375,6 +2375,7 @@ namespace WixToolset.Core
2375
}
2376
2377
this.CreateChainPackageMetaRows(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.Package, id.Id, previousType, previousId, after);
2378
+ this.Core.CreateGroupAndOrderingRows(sourceLineNumbers, parentType, parentId, ComplexReferenceChildType.ContainerPackage, id.Id, ComplexReferenceChildType.Unknown, null);
2379
}
2380
2381
return id.Id;
src/WixToolset.Core/Link/FlattenAndProcessBundleTablesCommand.cs
+109
-12
@@ -42,46 +42,143 @@ namespace WixToolset.Core.Link
42
// We need to flatten the nested PayloadGroups and PackageGroups under
43
// UX, Chain, and any Containers. When we're done, the WixGroups table
44
// will hold Payloads under UX, ChainPackages (references?) under Chain,
45
- // and ChainPackages/Payloads under the attached and any detatched
46
- // Containers.
45
+ // and ContainerPackages/Payloads under any authored Containers.
46
var groups = new WixGroupingOrdering(this.EntrySection, this.Messaging);
47
49
- // Create UX payloads and Package payloads
48
+ // Create UX payloads and Package payloads and Container packages
49
groups.UseTypes(new[] { ComplexReferenceParentType.Container, ComplexReferenceParentType.Layout, ComplexReferenceParentType.PackageGroup, ComplexReferenceParentType.PayloadGroup, ComplexReferenceParentType.Package },
51
- new[] { ComplexReferenceChildType.PackageGroup, ComplexReferenceChildType.Package, ComplexReferenceChildType.PackagePayload, ComplexReferenceChildType.PayloadGroup, ComplexReferenceChildType.Payload });
50
+ new[] { ComplexReferenceChildType.ContainerPackage, ComplexReferenceChildType.PackageGroup, ComplexReferenceChildType.Package, ComplexReferenceChildType.PackagePayload, ComplexReferenceChildType.PayloadGroup, ComplexReferenceChildType.Payload });
51
groups.FlattenAndRewriteGroups(ComplexReferenceParentType.Package, false);
52
groups.FlattenAndRewriteGroups(ComplexReferenceParentType.Container, false);
53
groups.FlattenAndRewriteGroups(ComplexReferenceParentType.Layout, false);
54
55
// Create Chain packages...
56
groups.UseTypes(new[] { ComplexReferenceParentType.PackageGroup }, new[] { ComplexReferenceChildType.Package, ComplexReferenceChildType.PackageGroup });
58
- groups.FlattenAndRewriteRows(ComplexReferenceChildType.PackageGroup, "WixChain", false);
57
+ groups.FlattenAndRewriteRows(ComplexReferenceParentType.PackageGroup, "WixChain", false);
58
59
groups.RemoveUsedGroupRows();
60
}
61
62
private void ProcessBundleComplexReferences()
63
{
64
+ var containersById = this.EntrySection.Symbols.OfType<WixBundleContainerSymbol>().ToDictionary(c => c.Id.Id);
65
var groups = this.EntrySection.Symbols.OfType<WixGroupSymbol>().ToList();
66
var payloadsById = this.EntrySection.Symbols.OfType<WixBundlePayloadSymbol>().ToDictionary(c => c.Id.Id);
67
68
+ var containerByPackage = new Dictionary<string, WixBundleContainerSymbol>();
69
+ var referencedPackages = new HashSet<string>();
70
+ var payloadsInBA = new HashSet<string>();
71
+ var payloadsInPackageOrLayout = new HashSet<string>();
72
+
73
+ foreach (var groupSymbol in groups)
74
+ {
75
+ switch (groupSymbol.ChildType)
76
+ {
77
+ case ComplexReferenceChildType.ContainerPackage:
78
+ switch (groupSymbol.ParentType)
79
+ {
80
+ case ComplexReferenceParentType.Container:
81
+ if (containerByPackage.TryGetValue(groupSymbol.ChildId, out var collisionContainer))
82
+ {
83
+ this.Messaging.Write(LinkerErrors.PackageInMultipleContainers(groupSymbol.SourceLineNumbers, groupSymbol.ChildId, groupSymbol.ParentId, collisionContainer.Id.Id));
84
+ }
85
+ else
86
+ {
87
+ containerByPackage.Add(groupSymbol.ChildId, containersById[groupSymbol.ParentId]);
88
+ }
89
+ break;
90
+ }
91
+ break;
92
+ case ComplexReferenceChildType.Package:
93
+ switch (groupSymbol.ParentType)
94
+ {
95
+ case ComplexReferenceParentType.PackageGroup:
96
+ if (groupSymbol.ParentId == "WixChain")
97
+ {
98
+ referencedPackages.Add(groupSymbol.ChildId);
99
+ }
100
+ break;
101
+ }
102
+ break;
103
+ case ComplexReferenceChildType.Payload:
104
+ switch (groupSymbol.ParentType)
105
+ {
106
+ case ComplexReferenceParentType.Container:
107
+ if (groupSymbol.ParentId == BurnConstants.BurnUXContainerName)
108
+ {
109
+ payloadsInBA.Add(groupSymbol.ChildId);
110
+ }
111
+ break;
112
+ case ComplexReferenceParentType.Layout:
113
+ payloadsById[groupSymbol.ChildId].LayoutOnly = true;
114
+ payloadsInPackageOrLayout.Add(groupSymbol.ChildId);
115
+ break;
116
+ case ComplexReferenceParentType.Package:
117
+ payloadsInPackageOrLayout.Add(groupSymbol.ChildId);
118
+ break;
119
+ }
120
+ break;
121
+ }
122
+ }
123
+
124
+ foreach (var package in this.EntrySection.Symbols.OfType<WixBundlePackageSymbol>())
125
+ {
126
+ if (!referencedPackages.Contains(package.Id.Id))
127
+ {
128
+ this.Messaging.Write(LinkerErrors.UnscheduledChainPackage(package.SourceLineNumbers, package.Id.Id));
129
+ }
130
+ }
131
+
132
+ foreach (var rollbackBoundary in this.EntrySection.Symbols.OfType<WixBundleRollbackBoundarySymbol>())
133
+ {
134
+ if (!referencedPackages.Contains(rollbackBoundary.Id.Id))
135
+ {
136
+ this.Messaging.Write(LinkerErrors.UnscheduledRollbackBoundary(rollbackBoundary.SourceLineNumbers, rollbackBoundary.Id.Id));
137
+ }
138
+ }
139
+
140
+ foreach (var payload in payloadsById.Values)
141
+ {
142
+ var payloadId = payload.Id.Id;
143
+ if (payloadsInBA.Contains(payloadId))
144
+ {
145
+ if (payloadsInPackageOrLayout.Contains(payloadId))
146
+ {
147
+ this.Messaging.Write(LinkerErrors.PayloadSharedWithBA(payload.SourceLineNumbers, payloadId));
148
+ }
149
+ }
150
+ else if (!payloadsInPackageOrLayout.Contains(payloadId))
151
+ {
152
+ this.Messaging.Write(LinkerErrors.OrphanedPayload(payload.SourceLineNumbers, payloadId));
153
+ }
154
+ }
155
+
156
+ if (this.Messaging.EncounteredError)
157
+ {
158
+ return;
159
+ }
160
+
161
// Assign authored payloads to authored containers.
162
// Compressed Payloads not assigned to a container here will get assigned to the default attached container during binding.
163
foreach (var groupSymbol in groups)
164
{
72
- if (ComplexReferenceChildType.Payload == groupSymbol.ChildType)
165
+ if (groupSymbol.ChildType == ComplexReferenceChildType.Payload && groupSymbol.ParentType == ComplexReferenceParentType.Container)
166
{
167
var payloadSymbol = payloadsById[groupSymbol.ChildId];
168
+ var containerId = groupSymbol.ParentId;
169
76
- if (ComplexReferenceParentType.Container == groupSymbol.ParentType)
170
+ if (String.IsNullOrEmpty(payloadSymbol.ContainerRef))
171
+ {
172
+ payloadSymbol.ContainerRef = containerId;
173
+ }
174
+ else
175
{
78
- // TODO: v3 didn't warn if we overwrote the payload's container.
79
- // Should we warn now?
80
- payloadSymbol.ContainerRef = groupSymbol.ParentId;
176
+ this.Messaging.Write(LinkerWarnings.PayloadInMultipleContainers(groupSymbol.SourceLineNumbers, groupSymbol.ChildId, containerId, payloadSymbol.ContainerRef));
177
}
82
- else if (ComplexReferenceParentType.Layout == groupSymbol.ParentType)
178
+
179
+ if (payloadSymbol.LayoutOnly)
180
{
84
- payloadSymbol.LayoutOnly = true;
181
+ this.Messaging.Write(LinkerWarnings.LayoutPayloadInContainer(groupSymbol.SourceLineNumbers, groupSymbol.ChildId, containerId));
182
}
183
}
184
}
src/WixToolset.Core/Link/WixGroupingOrdering.cs
+4
-7
@@ -62,7 +62,7 @@ namespace WixToolset.Core.Link
62
/// <param name="parentType">The group type for the parent group to flatten.</param>
63
/// <param name="parentId">The identifier of the parent group to flatten.</param>
64
/// <param name="removeUsedRows">Whether to remove used group rows before returning.</param>
65
- public void FlattenAndRewriteRows(ComplexReferenceChildType parentType, string parentId, bool removeUsedRows)
65
+ public void FlattenAndRewriteRows(ComplexReferenceParentType parentType, string parentId, bool removeUsedRows)
66
{
67
var parentTypeString = parentType.ToString();
68
Debug.Assert(this.groupTypes.Contains(parentTypeString));
@@ -648,14 +648,11 @@ namespace WixToolset.Core.Link
648
// We *don't* propagate ordering information from Packages or
649
// Containers to their children, because ordering doesn't matter
650
// for them, and a Payload in two Packages (or Containers) can
651
- // cause a circular reference to occur. We do, however, need to
652
- // track the ordering in the UX Container, because we need the
653
- // first payload to be the entrypoint.
651
+ // cause a circular reference to occur.
652
private bool ShouldItemPropagateChildOrdering()
653
{
656
- if (String.Equals(nameof(ComplexReferenceChildType.Package), this.Type, StringComparison.Ordinal) ||
657
- (String.Equals(nameof(ComplexReferenceParentType.Container), this.Type, StringComparison.Ordinal) &&
658
- !String.Equals(BurnConstants.BurnUXContainerName, this.Id, StringComparison.Ordinal)))
654
+ if (String.Equals(nameof(ComplexReferenceParentType.Package), this.Type, StringComparison.Ordinal) ||
655
+ String.Equals(nameof(ComplexReferenceParentType.Container), this.Type, StringComparison.Ordinal))
656
{
657
return false;
658
}
src/WixToolset.Core/LinkerErrors.cs
new
+48
@@ -0,0 +1,48 @@
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
+namespace WixToolset.Core
4
+{
5
+ using WixToolset.Data;
6
+
7
+ internal static class LinkerErrors
8
+ {
9
+ public static Message OrphanedPayload(SourceLineNumber sourceLineNumbers, string payloadId)
10
+ {
11
+ return Message(sourceLineNumbers, Ids.OrphanedPayload, "Found orphaned Payload '{0}'. Make sure to reference it from a Package, the BootstrapperApplication, or the Bundle or move it into its own Fragment so it only gets linked in when actually used.", payloadId);
12
+ }
13
+
14
+ public static Message PackageInMultipleContainers(SourceLineNumber sourceLineNumbers, string packageId, string containerId1, string containerId2)
15
+ {
16
+ return Message(sourceLineNumbers, Ids.PackageInMultipleContainers, "The Package '{0}' is referenced from multiple containers - Container '{1}' and Container '{2}'. This is not currently supported.", packageId, containerId1, containerId2);
17
+ }
18
+
19
+ public static Message PayloadSharedWithBA(SourceLineNumber sourceLineNumbers, string payloadId)
20
+ {
21
+ return Message(sourceLineNumbers, Ids.PayloadSharedWithBA, "The Payload '{0}' is shared with the BootstrapperApplication. This is not currently supported.", payloadId);
22
+ }
23
+
24
+ public static Message UnscheduledChainPackage(SourceLineNumber sourceLineNumbers, string packageId)
25
+ {
26
+ return Message(sourceLineNumbers, Ids.UnscheduledChainPackage, "Found orphaned Package '{0}'. Make sure to reference it from the Chain or move it into its own Fragment so it only gets linked in when actually used.", packageId);
27
+ }
28
+
29
+ public static Message UnscheduledRollbackBoundary(SourceLineNumber sourceLineNumbers, string rollbackBoundaryId)
30
+ {
31
+ return Message(sourceLineNumbers, Ids.UnscheduledRollbackBoundary, "Found orphaned RollbackBoundary '{0}'. Make sure to reference it from the Chain or move it into its own Fragment so it only gets linked in when actually used.", rollbackBoundaryId);
32
+ }
33
+
34
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
35
+ {
36
+ return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
37
+ }
38
+
39
+ public enum Ids
40
+ {
41
+ OrphanedPayload = 7000,
42
+ PackageInMultipleContainers = 7001,
43
+ PayloadSharedWithBA = 7002,
44
+ UnscheduledChainPackage = 7003,
45
+ UnscheduledRollbackBoundary = 7004,
46
+ } // last available is 7099. 7100 is WindowsInstallerBackendWarnings.
47
+ }
48
+}
src/WixToolset.Core/LinkerWarnings.cs
new
+30
@@ -0,0 +1,30 @@
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
+namespace WixToolset.Core
4
+{
5
+ using WixToolset.Data;
6
+
7
+ internal static class LinkerWarnings
8
+ {
9
+ public static Message LayoutPayloadInContainer(SourceLineNumber sourceLineNumbers, string payloadId, string containerId)
10
+ {
11
+ return Message(sourceLineNumbers, Ids.LayoutPayloadInContainer, "The layout-only Payload '{0}' is being added to Container '{1}'. It will not be extracted during layout.", payloadId, containerId);
12
+ }
13
+
14
+ public static Message PayloadInMultipleContainers(SourceLineNumber sourceLineNumbers, string payloadId, string containerId1, string containerId2)
15
+ {
16
+ return Message(sourceLineNumbers, Ids.PayloadInMultipleContainers, "The Payload '{0}' can't be added to Container '{1}' because it was already added to Container '{2}'.", payloadId, containerId1, containerId2);
17
+ }
18
+
19
+ private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
20
+ {
21
+ return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
22
+ }
23
+
24
+ public enum Ids
25
+ {
26
+ LayoutPayloadInContainer = 6900,
27
+ PayloadInMultipleContainers = 6901,
28
+ } // last available is 6999. 7000 is LinkerErrors.
29
+ }
30
+}
src/WixToolset.Core/WixToolset.Core.csproj
+12
@@ -13,6 +13,18 @@
13
<CreateDocumentationFile>true</CreateDocumentationFile>
14
</PropertyGroup>
15
16
+ <ItemGroup>
17
+ <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
18
+ <_Parameter1>WixToolset.Core.TestPackage, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1>
19
+ </AssemblyAttribute>
20
+ <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
21
+ <_Parameter1>WixToolsetTest.Core.Burn, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1>
22
+ </AssemblyAttribute>
23
+ <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
24
+ <_Parameter1>WixToolsetTest.CoreIntegration, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1>
25
+ </AssemblyAttribute>
26
+ </ItemGroup>
27
+
28
<ItemGroup>
29
<PackageReference Include="WixToolset.Data" Version="4.0.*" />
30
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" />
src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+59
-4
@@ -10,6 +10,7 @@ namespace WixToolsetTest.CoreIntegration
10
using System.Xml;
11
using Example.Extension;
12
using WixBuildTools.TestSupport;
13
+ using WixToolset.Core;
14
using WixToolset.Core.Burn;
15
using WixToolset.Core.TestPackage;
16
using WixToolset.Data;
@@ -368,7 +369,61 @@ namespace WixToolsetTest.CoreIntegration
369
}
370
}
371
371
- [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6291")]
372
+ [Fact]
373
+ public void CantBuildWithOrphanPayload()
374
+ {
375
+ var folder = TestData.Get(@"TestData");
376
+
377
+ using (var fs = new DisposableFileSystem())
378
+ {
379
+ var baseFolder = fs.GetFolder();
380
+ var intermediateFolder = Path.Combine(baseFolder, "obj");
381
+ var exePath = Path.Combine(baseFolder, @"bin\test.exe");
382
+
383
+ var result = WixRunner.Execute(new[]
384
+ {
385
+ "build",
386
+ Path.Combine(folder, "BadInput", "OrphanPayload.wxs"),
387
+ Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
388
+ Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"),
389
+ "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
390
+ "-bindpath", Path.Combine(folder, ".Data"),
391
+ "-intermediateFolder", intermediateFolder,
392
+ "-o", exePath,
393
+ });
394
+
395
+ Assert.Equal((int)LinkerErrors.Ids.OrphanedPayload, result.ExitCode);
396
+ }
397
+ }
398
+
399
+ [Fact]
400
+ public void CantBuildWithPackageInMultipleContainers()
401
+ {
402
+ var folder = TestData.Get(@"TestData");
403
+
404
+ using (var fs = new DisposableFileSystem())
405
+ {
406
+ var baseFolder = fs.GetFolder();
407
+ var intermediateFolder = Path.Combine(baseFolder, "obj");
408
+ var exePath = Path.Combine(baseFolder, @"bin\test.exe");
409
+
410
+ var result = WixRunner.Execute(new[]
411
+ {
412
+ "build",
413
+ Path.Combine(folder, "BadInput", "PackageInMultipleContainers.wxs"),
414
+ Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
415
+ Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"),
416
+ "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
417
+ "-bindpath", Path.Combine(folder, ".Data"),
418
+ "-intermediateFolder", intermediateFolder,
419
+ "-o", exePath,
420
+ });
421
+
422
+ Assert.Equal((int)LinkerErrors.Ids.PackageInMultipleContainers, result.ExitCode);
423
+ }
424
+ }
425
+
426
+ [Fact]
427
public void CantBuildWithUnscheduledPackage()
428
{
429
var folder = TestData.Get(@"TestData");
@@ -390,11 +445,11 @@ namespace WixToolsetTest.CoreIntegration
445
"-o", exePath,
446
});
447
393
- Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
448
+ Assert.Equal((int)LinkerErrors.Ids.UnscheduledChainPackage, result.ExitCode);
449
}
450
}
451
397
- [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6291")]
452
+ [Fact]
453
public void CantBuildWithUnscheduledRollbackBoundary()
454
{
455
var folder = TestData.Get(@"TestData");
@@ -416,7 +471,7 @@ namespace WixToolsetTest.CoreIntegration
471
"-o", exePath,
472
});
473
419
- Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
474
+ Assert.Equal((int)LinkerErrors.Ids.UnscheduledRollbackBoundary, result.ExitCode);
475
}
476
}
477
}
src/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs
+3
-3
@@ -291,7 +291,7 @@ namespace WixToolsetTest.CoreIntegration
291
var baFolderPath = Path.Combine(baseFolder, "ba");
292
var extractFolderPath = Path.Combine(baseFolder, "extract");
293
294
- var result = WixRunner.Execute(false, new[]
294
+ var result = WixRunner.Execute(new[]
295
{
296
"build",
297
Path.Combine(folder, "SharedPayloadsBetweenPackages", "SharedPayloadsBetweenPackages.wxs"),
@@ -315,8 +315,8 @@ namespace WixToolsetTest.CoreIntegration
315
{ "ExePackage", new List<string> { "CacheId", "InstallSize", "Size" } },
316
};
317
Assert.Equal(2, exePackageElements.Count);
318
- Assert.Equal("<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' DetectCondition='' InstallArguments='' UninstallArguments='' RepairArguments='' Repairable='no'><PayloadRef Id='credwiz.exe' /><PayloadRef Id='SourceFilePayload' /></ExePackage>", exePackageElements[0].GetTestXml(ignoreAttributesByElementName));
319
- Assert.Equal("<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' DetectCondition='' InstallArguments='' UninstallArguments='' RepairArguments='' Repairable='no'><PayloadRef Id='cscript.exe' /><PayloadRef Id='SourceFilePayload' /></ExePackage>", exePackageElements[1].GetTestXml(ignoreAttributesByElementName));
318
+ Assert.Equal("<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' DetectCondition='none' InstallArguments='' UninstallArguments='' RepairArguments='' Repairable='no'><PayloadRef Id='credwiz.exe' /><PayloadRef Id='SourceFilePayload' /></ExePackage>", exePackageElements[0].GetTestXml(ignoreAttributesByElementName));
319
+ Assert.Equal("<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' DetectCondition='none' InstallArguments='' UninstallArguments='' RepairArguments='' Repairable='no'><PayloadRef Id='cscript.exe' /><PayloadRef Id='SourceFilePayload' /></ExePackage>", exePackageElements[1].GetTestXml(ignoreAttributesByElementName));
320
}
321
}
322
src/test/WixToolsetTest.CoreIntegration/ContainerFixture.cs
+126
-71
@@ -8,10 +8,9 @@ namespace WixToolsetTest.CoreIntegration
8
using System.Linq;
9
using System.Xml;
10
using WixBuildTools.TestSupport;
11
+ using WixToolset.Core;
12
using WixToolset.Core.Burn;
13
using WixToolset.Core.TestPackage;
13
- using WixToolset.Data;
14
- using WixToolset.Data.Symbols;
14
using Xunit;
15
16
public class ContainerFixture
@@ -30,33 +29,9 @@ namespace WixToolsetTest.CoreIntegration
29
var baFolderPath = Path.Combine(baseFolder, "ba");
30
var extractFolderPath = Path.Combine(baseFolder, "extract");
31
33
- var result = WixRunner.Execute(new[]
34
- {
35
- "build",
36
- Path.Combine(folder, "MsiTransaction", "FirstX86.wxs"),
37
- Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
38
- Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
39
- "-bindpath", Path.Combine(folder, "SingleFile", "data"),
40
- "-intermediateFolder", intermediateFolder,
41
- "-o", Path.Combine(binFolder, "FirstX86.msi"),
42
- });
43
-
44
- result.AssertSuccess();
32
+ this.BuildMsis(folder, intermediateFolder, binFolder);
33
46
- result = WixRunner.Execute(new[]
47
- {
48
- "build",
49
- Path.Combine(folder, "MsiTransaction", "FirstX64.wxs"),
50
- Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
51
- Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
52
- "-bindpath", Path.Combine(folder, "SingleFile", "data"),
53
- "-intermediateFolder", intermediateFolder,
54
- "-o", Path.Combine(binFolder, "FirstX64.msi"),
55
- });
56
-
57
- result.AssertSuccess();
58
-
59
- result = WixRunner.Execute(new[]
34
+ var result = WixRunner.Execute(new[]
35
{
36
"build",
37
Path.Combine(folder, "Container", "HarvestIntoDetachedContainer.wxs"),
@@ -98,33 +73,9 @@ namespace WixToolsetTest.CoreIntegration
73
var baFolderPath = Path.Combine(baseFolder, "ba");
74
var extractFolderPath = Path.Combine(baseFolder, "extract");
75
101
- var result = WixRunner.Execute(new[]
102
- {
103
- "build",
104
- Path.Combine(folder, "MsiTransaction", "FirstX86.wxs"),
105
- Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
106
- Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
107
- "-bindpath", Path.Combine(folder, "SingleFile", "data"),
108
- "-intermediateFolder", intermediateFolder,
109
- "-o", Path.Combine(binFolder, "FirstX86.msi"),
110
- });
111
-
112
- result.AssertSuccess();
113
-
114
- result = WixRunner.Execute(new[]
115
- {
116
- "build",
117
- Path.Combine(folder, "MsiTransaction", "FirstX64.wxs"),
118
- Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
119
- Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
120
- "-bindpath", Path.Combine(folder, "SingleFile", "data"),
121
- "-intermediateFolder", intermediateFolder,
122
- "-o", Path.Combine(binFolder, "FirstX64.msi"),
123
- });
124
-
125
- result.AssertSuccess();
76
+ this.BuildMsis(folder, intermediateFolder, binFolder);
77
127
- result = WixRunner.Execute(new[]
78
+ var result = WixRunner.Execute(new[]
79
{
80
"build",
81
Path.Combine(folder, "Container", "HarvestIntoDetachedContainer.wxs"),
@@ -174,7 +125,7 @@ namespace WixToolsetTest.CoreIntegration
125
}
126
127
[Fact]
177
- public void MultipleAttachedContainersAreNotCurrentlySupported()
128
+ public void LayoutPayloadIsPutInContainer()
129
{
130
var folder = TestData.Get(@"TestData");
131
@@ -187,36 +138,92 @@ namespace WixToolsetTest.CoreIntegration
138
var baFolderPath = Path.Combine(baseFolder, "ba");
139
var extractFolderPath = Path.Combine(baseFolder, "extract");
140
190
- var result = WixRunner.Execute(new[]
141
+ this.BuildMsis(folder, intermediateFolder, binFolder);
142
+
143
+ var result = WixRunner.Execute(false, new[]
144
{
145
"build",
193
- Path.Combine(folder, "MsiTransaction", "FirstX86.wxs"),
194
- Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
195
- Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
196
- "-bindpath", Path.Combine(folder, "SingleFile", "data"),
146
+ Path.Combine(folder, "Container", "LayoutPayloadInContainer.wxs"),
147
+ "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
148
+ "-bindpath", binFolder,
149
"-intermediateFolder", intermediateFolder,
198
- "-o", Path.Combine(binFolder, "FirstX86.msi"),
150
+ "-o", bundlePath
151
});
152
153
+ WixAssert.CompareLineByLine(new string[]
154
+ {
155
+ "The layout-only Payload 'SharedPayload' is being added to Container 'FirstX64'. It will not be extracted during layout.",
156
+ }, result.Messages.Select(m => m.ToString()).ToArray());
157
result.AssertSuccess();
158
203
- result = WixRunner.Execute(new[]
159
+ Assert.True(File.Exists(bundlePath));
160
+
161
+ var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath);
162
+ extractResult.AssertSuccess();
163
+
164
+ var ignoreAttributes = new Dictionary<string, List<string>> { { "Payload", new List<string> { "FileSize", "Hash" } } };
165
+ var payloads = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Payload[@Id='SharedPayload']")
166
+ .Cast<XmlElement>()
167
+ .Select(e => e.GetTestXml(ignoreAttributes))
168
+ .ToArray();
169
+ WixAssert.CompareLineByLine(new string[]
170
+ {
171
+ "<Payload Id='SharedPayload' FilePath='LayoutPayloadInContainer.wxs' FileSize='*' Hash='*' LayoutOnly='yes' Packaging='embedded' SourcePath='a1' Container='FirstX64' />",
172
+ }, payloads);
173
+ }
174
+ }
175
+
176
+ [Fact]
177
+ public void MultipleAttachedContainersAreNotCurrentlySupported()
178
+ {
179
+ var folder = TestData.Get(@"TestData");
180
+
181
+ using (var fs = new DisposableFileSystem())
182
+ {
183
+ var baseFolder = fs.GetFolder();
184
+ var intermediateFolder = Path.Combine(baseFolder, "obj");
185
+ var binFolder = Path.Combine(baseFolder, "bin");
186
+ var bundlePath = Path.Combine(binFolder, "test.exe");
187
+ var baFolderPath = Path.Combine(baseFolder, "ba");
188
+ var extractFolderPath = Path.Combine(baseFolder, "extract");
189
+
190
+ this.BuildMsis(folder, intermediateFolder, binFolder);
191
+
192
+ var result = WixRunner.Execute(new[]
193
{
194
"build",
206
- Path.Combine(folder, "MsiTransaction", "FirstX64.wxs"),
207
- Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
208
- Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
209
- "-bindpath", Path.Combine(folder, "SingleFile", "data"),
195
+ Path.Combine(folder, "Container", "MultipleAttachedContainers.wxs"),
196
+ Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
197
+ "-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
198
+ "-bindpath", binFolder,
199
"-intermediateFolder", intermediateFolder,
211
- "-o", Path.Combine(binFolder, "FirstX64.msi"),
200
+ "-o", bundlePath
201
});
202
214
- result.AssertSuccess();
203
+ Assert.Equal((int)BurnBackendErrors.Ids.MultipleAttachedContainersUnsupported, result.ExitCode);
204
+ }
205
+ }
206
+
207
+ [Fact]
208
+ public void PayloadIsNotPutInMultipleContainers()
209
+ {
210
+ var folder = TestData.Get(@"TestData");
211
+
212
+ using (var fs = new DisposableFileSystem())
213
+ {
214
+ var baseFolder = fs.GetFolder();
215
+ var intermediateFolder = Path.Combine(baseFolder, "obj");
216
+ var binFolder = Path.Combine(baseFolder, "bin");
217
+ var bundlePath = Path.Combine(binFolder, "test.exe");
218
+ var baFolderPath = Path.Combine(baseFolder, "ba");
219
+ var extractFolderPath = Path.Combine(baseFolder, "extract");
220
+
221
+ this.BuildMsis(folder, intermediateFolder, binFolder);
222
216
- result = WixRunner.Execute(new[]
223
+ var result = WixRunner.Execute(false, new[]
224
{
225
"build",
219
- Path.Combine(folder, "Container", "MultipleAttachedContainers.wxs"),
226
+ Path.Combine(folder, "Container", "PayloadInMultipleContainers.wxs"),
227
Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"),
228
"-bindpath", Path.Combine(folder, "SimpleBundle", "data"),
229
"-bindpath", binFolder,
@@ -224,8 +231,56 @@ namespace WixToolsetTest.CoreIntegration
231
"-o", bundlePath
232
});
233
227
- Assert.Equal((int)BurnBackendErrors.Ids.MultipleAttachedContainersUnsupported, result.ExitCode);
234
+ WixAssert.CompareLineByLine(new string[]
235
+ {
236
+ "The Payload 'SharedPayload' can't be added to Container 'FirstX64' because it was already added to Container 'FirstX86'.",
237
+ }, result.Messages.Select(m => m.ToString()).ToArray());
238
+ result.AssertSuccess();
239
+
240
+ Assert.True(File.Exists(bundlePath));
241
+
242
+ var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath);
243
+ extractResult.AssertSuccess();
244
+
245
+ var ignoreAttributes = new Dictionary<string, List<string>> { { "Payload", new List<string> { "FileSize", "Hash" } } };
246
+ var payloads = extractResult.SelectManifestNodes("/burn:BurnManifest/burn:Payload[@Id='SharedPayload']")
247
+ .Cast<XmlElement>()
248
+ .Select(e => e.GetTestXml(ignoreAttributes))
249
+ .ToArray();
250
+ WixAssert.CompareLineByLine(new string[]
251
+ {
252
+ "<Payload Id='SharedPayload' FilePath='PayloadInMultipleContainers.wxs' FileSize='*' Hash='*' Packaging='embedded' SourcePath='a2' Container='FirstX86' />",
253
+ }, payloads);
254
}
255
}
256
+
257
+ private void BuildMsis(string folder, string intermediateFolder, string binFolder)
258
+ {
259
+ var result = WixRunner.Execute(new[]
260
+ {
261
+ "build",
262
+ Path.Combine(folder, "MsiTransaction", "FirstX86.wxs"),
263
+ Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
264
+ Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
265
+ "-bindpath", Path.Combine(folder, "SingleFile", "data"),
266
+ "-intermediateFolder", intermediateFolder,
267
+ "-o", Path.Combine(binFolder, "FirstX86.msi"),
268
+ });
269
+
270
+ result.AssertSuccess();
271
+
272
+ result = WixRunner.Execute(new[]
273
+ {
274
+ "build",
275
+ Path.Combine(folder, "MsiTransaction", "FirstX64.wxs"),
276
+ Path.Combine(folder, "ProductWithComponentGroupRef", "MinimalComponentGroup.wxs"),
277
+ Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
278
+ "-bindpath", Path.Combine(folder, "SingleFile", "data"),
279
+ "-intermediateFolder", intermediateFolder,
280
+ "-o", Path.Combine(binFolder, "FirstX64.msi"),
281
+ });
282
+
283
+ result.AssertSuccess();
284
+ }
285
}
286
}
src/test/WixToolsetTest.CoreIntegration/PayloadFixture.cs
+3
-2
@@ -8,6 +8,7 @@ namespace WixToolsetTest.CoreIntegration
8
using System.Linq;
9
using System.Xml;
10
using WixBuildTools.TestSupport;
11
+ using WixToolset.Core;
12
using WixToolset.Core.TestPackage;
13
using WixToolset.Data;
14
using WixToolset.Data.Symbols;
@@ -117,7 +118,7 @@ namespace WixToolsetTest.CoreIntegration
118
}
119
}
120
120
- [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5273")]
121
+ [Fact]
122
public void RejectsPayloadSharedBetweenPackageAndBA()
123
{
124
var folder = TestData.Get(@"TestData");
@@ -139,7 +140,7 @@ namespace WixToolsetTest.CoreIntegration
140
"-o", bundlePath,
141
});
142
142
- Assert.InRange(result.ExitCode, 2, int.MaxValue);
143
+ Assert.Equal((int)LinkerErrors.Ids.PayloadSharedWithBA, result.ExitCode);
144
}
145
}
146
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/OrphanPayload.wxs
new
+11
@@ -0,0 +1,11 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Fragment>
4
+ <PackageGroup Id="BundlePackages">
5
+ <PackageGroupRef Id="MinimalPackageGroup" />
6
+ </PackageGroup>
7
+ <PayloadGroup Id="OrphanPayloads">
8
+ <Payload Id="OrphanPayload" SourceFile="$(sys.SOURCEFILEPATH)" />
9
+ </PayloadGroup>
10
+ </Fragment>
11
+</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/PackageInMultipleContainers.wxs
new
+14
@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Fragment>
4
+ <PackageGroup Id="BundlePackages">
5
+ <PackageGroupRef Id="MinimalPackageGroup" />
6
+ </PackageGroup>
7
+ <Container Id="First">
8
+ <PackageGroupRef Id="BundlePackages" />
9
+ </Container>
10
+ <Container Id="Second">
11
+ <PackageGroupRef Id="BundlePackages" />
12
+ </Container>
13
+ </Fragment>
14
+</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledPackage.wxs
+3
-3
@@ -2,15 +2,15 @@
2
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
<Fragment>
4
<PackageGroup Id="BundlePackages">
5
- <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" />
6
- <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" />
5
+ <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" DetectCondition="none" />
6
+ <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" DetectCondition="none" />
7
</PackageGroup>
8
<SetVariableRef Id="Dummy" />
9
</Fragment>
10
<Fragment>
11
<SetVariable Id="Dummy" Variable="Dummy" />
12
<PackageGroup Id="Unscheduled">
13
- <ExePackage Id="Unscheduled1" SourceFile="burn.exe" CacheId="Unscheduled1" />
13
+ <ExePackage Id="Unscheduled1" SourceFile="burn.exe" CacheId="Unscheduled1" DetectCondition="none" />
14
</PackageGroup>
15
</Fragment>
16
</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/UnscheduledRollbackBoundary.wxs
+2
-2
@@ -2,8 +2,8 @@
2
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
<Fragment>
4
<PackageGroup Id="BundlePackages">
5
- <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" />
6
- <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" />
5
+ <ExePackage Id="Auto1" SourceFile="burn.exe" CacheId="Auto1" DetectCondition="none" />
6
+ <ExePackage Id="Auto2" SourceFile="burn.exe" CacheId="Auto2" DetectCondition="none" />
7
</PackageGroup>
8
<SetVariableRef Id="Dummy" />
9
</Fragment>
src/test/WixToolsetTest.CoreIntegration/TestData/Container/LayoutPayloadInContainer.wxs
new
+28
@@ -0,0 +1,28 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Bundle Name="BurnBundle" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{B5B23622-239B-4E3B-BDAB-67648CB975BF}">
4
+ <BootstrapperApplication>
5
+ <BootstrapperApplicationDll SourceFile="fakeba.dll" />
6
+ </BootstrapperApplication>
7
+ <Chain>
8
+ <PackageGroupRef Id="BundlePackages" />
9
+ </Chain>
10
+ <PayloadGroupRef Id="Shared" />
11
+ </Bundle>
12
+ <Fragment>
13
+ <PackageGroup Id="BundlePackages">
14
+ <PackageGroupRef Id="FirstX64" />
15
+ </PackageGroup>
16
+ <PackageGroup Id="FirstX64">
17
+ <MsiPackage SourceFile="FirstX64.msi">
18
+ <PayloadGroupRef Id="Shared" />
19
+ </MsiPackage>
20
+ </PackageGroup>
21
+ <Container Id="FirstX64" Name="FirstX64" Type="detached">
22
+ <PackageGroupRef Id="FirstX64" />
23
+ </Container>
24
+ <PayloadGroup Id="Shared">
25
+ <Payload Id="SharedPayload" SourceFile="$(sys.SOURCEFILEPATH)" />
26
+ </PayloadGroup>
27
+ </Fragment>
28
+</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/Container/PayloadInMultipleContainers.wxs
new
+28
@@ -0,0 +1,28 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Fragment>
4
+ <PackageGroup Id="BundlePackages">
5
+ <PackageGroupRef Id="FirstX86" />
6
+ <PackageGroupRef Id="FirstX64" />
7
+ </PackageGroup>
8
+ <PackageGroup Id="FirstX86">
9
+ <MsiPackage SourceFile="FirstX86.msi">
10
+ <PayloadGroupRef Id="Shared" />
11
+ </MsiPackage>
12
+ </PackageGroup>
13
+ <PackageGroup Id="FirstX64">
14
+ <MsiPackage SourceFile="FirstX64.msi">
15
+ <PayloadGroupRef Id="Shared" />
16
+ </MsiPackage>
17
+ </PackageGroup>
18
+ <Container Id="FirstX86" Name="FirstX86" Type="detached">
19
+ <PackageGroupRef Id="FirstX86" />
20
+ </Container>
21
+ <Container Id="FirstX64" Name="FirstX64" Type="detached">
22
+ <PackageGroupRef Id="FirstX64" />
23
+ </Container>
24
+ <PayloadGroup Id="Shared">
25
+ <Payload Id="SharedPayload" SourceFile="$(sys.SOURCEFILEPATH)" />
26
+ </PayloadGroup>
27
+ </Fragment>
28
+</Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/Payload/SharedBAAndPackagePayloadBundle.wxs
+1
-1
@@ -2,7 +2,7 @@
2
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
<Fragment>
4
<PackageGroup Id="BundlePackages">
5
- <ExePackage SourceFile="burn.exe">
5
+ <ExePackage SourceFile="burn.exe" DetectCondition="none">
6
<PayloadGroupRef Id="Shared" />
7
</ExePackage>
8
</PackageGroup>
src/test/WixToolsetTest.CoreIntegration/TestData/SharedPayloadsBetweenPackages/SharedPayloadsBetweenPackages.wxs
+2
-2
@@ -2,10 +2,10 @@
2
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
<Fragment>
4
<PackageGroup Id="BundlePackages">
5
- <ExePackage SourceFile="C:\Windows\system32\credwiz.exe" Permanent="yes">
5
+ <ExePackage SourceFile="C:\Windows\system32\credwiz.exe" Permanent="yes" DetectCondition="none">
6
<PayloadGroupRef Id="SharedPayloads" />
7
</ExePackage>
8
- <ExePackage SourceFile="C:\Windows\system32\cscript.exe" Permanent="yes">
8
+ <ExePackage SourceFile="C:\Windows\system32\cscript.exe" Permanent="yes" DetectCondition="none">
9
<PayloadGroupRef Id="SharedPayloads" />
10
</ExePackage>
11
</PackageGroup>