@joebigelow / wix-1 / commits / 0531df3e

Detect payload collisions.

#4574

Sean Hall committed Apr 21, 2021 at 16:51 UTC 0531df3e9f7b3e41434def0c569bd748adc721f6
12 files changed +281 -34
src/WixToolset.Core.Burn/Bind/BindBundleCommand.cs
+15 -6
@@ -436,13 +436,23 @@ namespace WixToolset.Core.Burn
436 trackedFiles.Add(this.BackendHelper.TrackFile(bextManifestPath, TrackedFileType.Temporary));
437 }
438
439 + var containers = section.Symbols.OfType<WixBundleContainerSymbol>().ToDictionary(t => t.Id.Id);
440 + {
441 + var command = new DetectPayloadCollisionsCommand(this.Messaging, containers, facades.Values, payloadSymbols, packagesPayloads);
442 + command.Execute();
443 + }
444 +
445 + if (this.Messaging.EncounteredError)
446 + {
447 + return;
448 + }
449 +
450 // Create all the containers except the UX container first so the manifest (that goes in the UX container)
451 // can contain all size and hash information about the non-UX containers.
452 WixBundleContainerSymbol uxContainer;
453 IEnumerable<WixBundlePayloadSymbol> uxPayloads;
443 - IEnumerable<WixBundleContainerSymbol> containers;
454 {
445 - var command = new CreateNonUXContainers(this.BackendHelper, section, bundleApplicationDllSymbol, payloadSymbols, this.IntermediateFolder, layoutDirectory, this.DefaultCompressionLevel);
455 + var command = new CreateNonUXContainers(this.BackendHelper, section, bundleApplicationDllSymbol, containers.Values, payloadSymbols, this.IntermediateFolder, layoutDirectory, this.DefaultCompressionLevel);
456 command.Execute();
457
458 fileTransfers.AddRange(command.FileTransfers);
@@ -450,12 +460,11 @@ namespace WixToolset.Core.Burn
460
461 uxContainer = command.UXContainer;
462 uxPayloads = command.UXContainerPayloads;
453 - containers = command.Containers;
463 }
464
465 // Resolve the download URLs now that we have all of the containers and payloads calculated.
466 {
458 - var command = new ResolveDownloadUrlsCommand(this.Messaging, this.BackendExtensions, containers, payloadSymbols);
467 + var command = new ResolveDownloadUrlsCommand(this.Messaging, this.BackendExtensions, containers.Values, payloadSymbols);
468 command.Execute();
469 }
470
@@ -464,7 +473,7 @@ namespace WixToolset.Core.Burn
473 {
474 var executableName = Path.GetFileName(this.OutputPath);
475
467 - var command = new CreateBurnManifestCommand(executableName, section, bundleSymbol, containers, chainSymbol, orderedFacades, boundaries, uxPayloads, payloadSymbols, packagesPayloads, orderedSearches, this.IntermediateFolder);
476 + var command = new CreateBurnManifestCommand(executableName, section, bundleSymbol, containers.Values, chainSymbol, orderedFacades, boundaries, uxPayloads, payloadSymbols, packagesPayloads, orderedSearches, this.IntermediateFolder);
477 command.Execute();
478
479 manifestPath = command.OutputPath;
@@ -483,7 +492,7 @@ namespace WixToolset.Core.Burn
492 }
493
494 {
486 - var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleApplicationDllSymbol, bundleSymbol, uxContainer, containers);
495 + var command = new CreateBundleExeCommand(this.Messaging, this.BackendHelper, this.IntermediateFolder, this.OutputPath, bundleApplicationDllSymbol, bundleSymbol, uxContainer, containers.Values);
496 command.Execute();
497
498 fileTransfers.Add(command.Transfer);
src/WixToolset.Core.Burn/Bundles/CreateNonUXContainers.cs
+4 -6
@@ -14,11 +14,12 @@ namespace WixToolset.Core.Burn.Bundles
14
15 internal class CreateNonUXContainers
16 {
17 - public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationDllSymbol bootstrapperApplicationDllSymbol, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel)
17 + public CreateNonUXContainers(IBackendHelper backendHelper, IntermediateSection section, WixBootstrapperApplicationDllSymbol bootstrapperApplicationDllSymbol, IEnumerable<WixBundleContainerSymbol> containerSymbols, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, string intermediateFolder, string layoutFolder, CompressionLevel? defaultCompressionLevel)
18 {
19 this.BackendHelper = backendHelper;
20 this.Section = section;
21 this.BootstrapperApplicationDllSymbol = bootstrapperApplicationDllSymbol;
22 + this.Containers = containerSymbols;
23 this.PayloadSymbols = payloadSymbols;
24 this.IntermediateFolder = intermediateFolder;
25 this.LayoutFolder = layoutFolder;
@@ -33,7 +34,7 @@ namespace WixToolset.Core.Burn.Bundles
34
35 public IEnumerable<WixBundlePayloadSymbol> UXContainerPayloads { get; private set; }
36
36 - public IEnumerable<WixBundleContainerSymbol> Containers { get; private set; }
37 + private IEnumerable<WixBundleContainerSymbol> Containers { get; }
38
39 private IBackendHelper BackendHelper { get; }
40
@@ -57,11 +58,9 @@ namespace WixToolset.Core.Burn.Bundles
58
59 var attachedContainerIndex = 1; // count starts at one because UX container is "0".
60
60 - var containerSymbols = this.Section.Symbols.OfType<WixBundleContainerSymbol>().ToList();
61 -
61 var payloadsByContainer = this.PayloadSymbols.Values.ToLookup(p => p.ContainerRef);
62
64 - foreach (var container in containerSymbols)
63 + foreach (var container in this.Containers)
64 {
65 var containerId = container.Id.Id;
66
@@ -120,7 +119,6 @@ namespace WixToolset.Core.Burn.Bundles
119 }
120 }
121
123 - this.Containers = containerSymbols;
122 this.UXContainerPayloads = uxPayloadSymbols;
123 this.FileTransfers = fileTransfers;
124 this.TrackedFiles = trackedFiles;
src/WixToolset.Core.Burn/Bundles/DetectPayloadCollisionsCommand.cs new
+137
@@ -0,0 +1,137 @@
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.Burn.Bundles
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using System.Linq;
8 + using WixToolset.Data;
9 + using WixToolset.Data.Burn;
10 + using WixToolset.Data.Symbols;
11 + using WixToolset.Extensibility.Services;
12 +
13 + internal class DetectPayloadCollisionsCommand
14 + {
15 + public DetectPayloadCollisionsCommand(IMessaging messaging, Dictionary<string, WixBundleContainerSymbol> containerSymbols, IEnumerable<PackageFacade> packages, Dictionary<string, WixBundlePayloadSymbol> payloadSymbols, Dictionary<string, Dictionary<string, WixBundlePayloadSymbol>> packagePayloads)
16 + {
17 + this.Messaging = messaging;
18 + this.Containers = containerSymbols;
19 + this.Packages = packages;
20 + this.PayloadSymbols = payloadSymbols;
21 + this.PackagePayloads = packagePayloads;
22 + }
23 +
24 + private IMessaging Messaging { get; }
25 +
26 + private Dictionary<string, WixBundleContainerSymbol> Containers { get; }
27 +
28 + private IEnumerable<PackageFacade> Packages { get; }
29 +
30 + private Dictionary<string, WixBundlePayloadSymbol> PayloadSymbols { get; }
31 +
32 + private Dictionary<string, Dictionary<string, WixBundlePayloadSymbol>> PackagePayloads { get; }
33 +
34 + public void Execute()
35 + {
36 + this.DetectAttachedContainerCollisions();
37 + this.DetectExternalCollisions();
38 + this.DetectPackageCacheCollisions();
39 + }
40 +
41 + public void DetectAttachedContainerCollisions()
42 + {
43 + var attachedContainerPayloadsByNameByContainer = new Dictionary<string, Dictionary<string, WixBundlePayloadSymbol>>();
44 +
45 + foreach (var payload in this.PayloadSymbols.Values.Where(p => p.Packaging == PackagingType.Embedded))
46 + {
47 + var containerId = payload.ContainerRef;
48 + var container = this.Containers[containerId];
49 + if (container.Type == ContainerType.Attached)
50 + {
51 + if (!attachedContainerPayloadsByNameByContainer.TryGetValue(containerId, out var attachedContainerPayloadsByName))
52 + {
53 + attachedContainerPayloadsByName = new Dictionary<string, WixBundlePayloadSymbol>(StringComparer.OrdinalIgnoreCase);
54 + attachedContainerPayloadsByNameByContainer.Add(containerId, attachedContainerPayloadsByName);
55 + }
56 +
57 + if (!attachedContainerPayloadsByName.TryGetValue(payload.Name, out var collisionPayload))
58 + {
59 + attachedContainerPayloadsByName.Add(payload.Name, payload);
60 + }
61 + else
62 + {
63 + if (containerId == BurnConstants.BurnUXContainerName)
64 + {
65 + this.Messaging.Write(BurnBackendErrors.BAContainerPayloadCollision(payload.SourceLineNumbers, payload.Id.Id, payload.Name));
66 + this.Messaging.Write(BurnBackendErrors.BAContainerPayloadCollision2(collisionPayload.SourceLineNumbers));
67 + }
68 + else
69 + {
70 + this.Messaging.Write(BurnBackendWarnings.AttachedContainerPayloadCollision(payload.SourceLineNumbers, payload.Id.Id, payload.Name));
71 + this.Messaging.Write(BurnBackendWarnings.AttachedContainerPayloadCollision2(collisionPayload.SourceLineNumbers));
72 + }
73 + }
74 + }
75 + }
76 + }
77 +
78 + public void DetectExternalCollisions()
79 + {
80 + var externalPayloadsByName = new Dictionary<string, IntermediateSymbol>(StringComparer.OrdinalIgnoreCase);
81 +
82 + foreach (var payload in this.PayloadSymbols.Values.Where(p => p.Packaging == PackagingType.External))
83 + {
84 + if (!externalPayloadsByName.TryGetValue(payload.Name, out var collisionSymbol))
85 + {
86 + externalPayloadsByName.Add(payload.Name, payload);
87 + }
88 + else
89 + {
90 + this.Messaging.Write(BurnBackendErrors.ExternalPayloadCollision(payload.SourceLineNumbers, "Payload", payload.Id.Id, payload.Name));
91 + this.Messaging.Write(BurnBackendErrors.ExternalPayloadCollision2(collisionSymbol.SourceLineNumbers));
92 + }
93 + }
94 +
95 + foreach (var container in this.Containers.Values.Where(c => c.Type == ContainerType.Detached))
96 + {
97 + if (!externalPayloadsByName.TryGetValue(container.Name, out var collisionSymbol))
98 + {
99 + externalPayloadsByName.Add(container.Name, container);
100 + }
101 + else
102 + {
103 + this.Messaging.Write(BurnBackendErrors.ExternalPayloadCollision(container.SourceLineNumbers, "Container", container.Id.Id, container.Name));
104 + this.Messaging.Write(BurnBackendErrors.ExternalPayloadCollision2(collisionSymbol.SourceLineNumbers));
105 + }
106 + }
107 + }
108 +
109 + public void DetectPackageCacheCollisions()
110 + {
111 + var packageCachePayloadsByNameByCacheId = new Dictionary<string, Dictionary<string, WixBundlePayloadSymbol>>();
112 +
113 + foreach (var packageFacade in this.Packages)
114 + {
115 + var packagePayloads = this.PackagePayloads[packageFacade.PackageId];
116 + if (!packageCachePayloadsByNameByCacheId.TryGetValue(packageFacade.PackageSymbol.CacheId, out var packageCachePayloadsByName))
117 + {
118 + packageCachePayloadsByName = new Dictionary<string, WixBundlePayloadSymbol>(StringComparer.OrdinalIgnoreCase);
119 + packageCachePayloadsByNameByCacheId.Add(packageFacade.PackageSymbol.CacheId, packageCachePayloadsByName);
120 + }
121 +
122 + foreach (var payload in packagePayloads.Values)
123 + {
124 + if (!packageCachePayloadsByName.TryGetValue(payload.Name, out var collisionPayload))
125 + {
126 + packageCachePayloadsByName.Add(payload.Name, payload);
127 + }
128 + else
129 + {
130 + this.Messaging.Write(BurnBackendErrors.PackageCachePayloadCollision(payload.SourceLineNumbers, payload.Id.Id, payload.Name, packageFacade.PackageId));
131 + this.Messaging.Write(BurnBackendErrors.PackageCachePayloadCollision2(collisionPayload.SourceLineNumbers));
132 + }
133 + }
134 + }
135 + }
136 + }
137 +}
src/WixToolset.Core.Burn/BurnBackendErrors.cs
+36
@@ -6,6 +6,16 @@ namespace WixToolset.Core.Burn
6
7 internal static class BurnBackendErrors
8 {
9 + public static Message BAContainerPayloadCollision(SourceLineNumber sourceLineNumbers, string payloadId, string payloadName)
10 + {
11 + return Message(sourceLineNumbers, Ids.BAContainerPayloadCollision, "The Payload '{0}' has a duplicate Name '{1}' in the BA container. When extracting the container at runtime, the file will get overwritten.", payloadId, payloadName);
12 + }
13 +
14 + public static Message BAContainerPayloadCollision2(SourceLineNumber sourceLineNumbers)
15 + {
16 + return Message(sourceLineNumbers, Ids.BAContainerPayloadCollision2, "The location of the payload related to the previous error.");
17 + }
18 +
19 public static Message DuplicateCacheIds(SourceLineNumber originalLineNumber, string cacheId, string packageId)
20 {
21 return Message(originalLineNumber, Ids.DuplicateCacheIds, "The CacheId '{0}' for package '{1}' is duplicated. Each package must have a unique CacheId.", cacheId, packageId);
@@ -16,6 +26,26 @@ namespace WixToolset.Core.Burn
26 return Message(duplicateLineNumber, Ids.DuplicateCacheIds2, "The location of the package related to the previous error.");
27 }
28
29 + public static Message ExternalPayloadCollision(SourceLineNumber sourceLineNumbers, string symbolName, string payloadId, string payloadName)
30 + {
31 + return Message(sourceLineNumbers, Ids.ExternalPayloadCollision, "The external {0} '{1}' has a duplicate Name '{2}'. When building the bundle or laying out the bundle, the file will get overwritten.", symbolName, payloadId, payloadName);
32 + }
33 +
34 + public static Message ExternalPayloadCollision2(SourceLineNumber sourceLineNumbers)
35 + {
36 + return Message(sourceLineNumbers, Ids.ExternalPayloadCollision2, "The location of the symbol related to the previous error.");
37 + }
38 +
39 + public static Message PackageCachePayloadCollision(SourceLineNumber sourceLineNumbers, string payloadId, string payloadName, string packageId)
40 + {
41 + return Message(sourceLineNumbers, Ids.PackageCachePayloadCollision, "The Payload '{0}' has a duplicate Name '{1}' in package '{2}'. When caching the package, the file will get overwritten.", payloadId, payloadName, packageId);
42 + }
43 +
44 + public static Message PackageCachePayloadCollision2(SourceLineNumber sourceLineNumbers)
45 + {
46 + return Message(sourceLineNumbers, Ids.PackageCachePayloadCollision2, "The location of the payload related to the previous error.");
47 + }
48 +
49 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
50 {
51 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
@@ -25,6 +55,12 @@ namespace WixToolset.Core.Burn
55 {
56 DuplicateCacheIds = 8000,
57 DuplicateCacheIds2 = 8001,
58 + BAContainerPayloadCollision = 8002,
59 + BAContainerPayloadCollision2 = 8003,
60 + ExternalPayloadCollision = 8004,
61 + ExternalPayloadCollision2 = 8005,
62 + PackageCachePayloadCollision = 8006,
63 + PackageCachePayloadCollision2 = 8007,
64 }
65 }
66 }
src/WixToolset.Core.Burn/BurnBackendWarnings.cs
+11 -5
@@ -6,10 +6,15 @@ namespace WixToolset.Core.Burn
6
7 internal static class BurnBackendWarnings
8 {
9 - //public static Message ReplaceThisWithTheFirstWarning(SourceLineNumber sourceLineNumbers)
10 - //{
11 - // return Message(sourceLineNumbers, Ids.ReplaceThisWithTheFirstWarning, "format string", arg1, arg2);
12 - //}
9 + public static Message AttachedContainerPayloadCollision(SourceLineNumber sourceLineNumbers, string payloadId, string payloadName)
10 + {
11 + return Message(sourceLineNumbers, Ids.AttachedContainerPayloadCollision, "The Payload '{0}' has a duplicate Name '{1}' in the attached container. When extracting the bundle with dark.exe, the file will get overwritten.", payloadId, payloadName);
12 + }
13 +
14 + public static Message AttachedContainerPayloadCollision2(SourceLineNumber sourceLineNumbers)
15 + {
16 + return Message(sourceLineNumbers, Ids.AttachedContainerPayloadCollision2, "The location of the payload related to the previous error.");
17 + }
18
19 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
20 {
@@ -18,7 +23,8 @@ namespace WixToolset.Core.Burn
23
24 public enum Ids
25 {
21 - // ReplaceThisWithTheFirstWarning = 8500,
26 + AttachedContainerPayloadCollision = 8500,
27 + AttachedContainerPayloadCollision2 = 8501,
28 }
29 }
30 }
src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj
+3
@@ -19,6 +19,9 @@
19 <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
20 <_Parameter1>WixToolsetTest.Core.Burn, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1>
21 </AssemblyAttribute>
22 + <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
23 + <_Parameter1>WixToolsetTest.CoreIntegration, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a9967ec28982f42ee51a47dd5204315975a6ed69294b982146a99a70130a2fa13e226aaddde14c17d1bf3af69e8956d69a86585e74d208efcc5ac98a0686055327b2e87960d3c39bf3a6bc1e572863327d19dbf4fd2616dda124dbea260755a2d1d39d3cf1049ea526493eb2bf996b8ad985e3012308529e5b9b0f5cd5fa04bd</_Parameter1>
24 + </AssemblyAttribute>
25 </ItemGroup>
26
27 <ItemGroup>
src/test/WixToolsetTest.CoreIntegration/BundleFixture.cs
+38 -2
@@ -10,6 +10,7 @@ namespace WixToolsetTest.CoreIntegration
10 using System.Xml;
11 using Example.Extension;
12 using WixBuildTools.TestSupport;
13 + using WixToolset.Core.Burn;
14 using WixToolset.Core.TestPackage;
15 using WixToolset.Data;
16 using WixToolset.Data.Burn;
@@ -306,7 +307,7 @@ namespace WixToolsetTest.CoreIntegration
307 }
308 }
309
309 - [Fact(Skip = "https://github.com/wixtoolset/issues/issues/4574")]
310 + [Fact]
311 public void CantBuildWithDuplicatePayloadNames()
312 {
313 var folder = TestData.Get(@"TestData");
@@ -328,7 +329,42 @@ namespace WixToolsetTest.CoreIntegration
329 "-o", exePath,
330 });
331
331 - Assert.InRange(result.ExitCode, 2, Int32.MaxValue);
332 + var attachedContainerWarnings = result.Messages.Where(m => m.Id == (int)BurnBackendWarnings.Ids.AttachedContainerPayloadCollision)
333 + .Select(m => m.ToString())
334 + .ToArray();
335 + WixAssert.CompareLineByLine(new string[]
336 + {
337 + "The Payload 'Auto2' has a duplicate Name 'burn.exe' in the attached container. When extracting the bundle with dark.exe, the file will get overwritten.",
338 + }, attachedContainerWarnings);
339 +
340 + var baContainerErrors = result.Messages.Where(m => m.Id == (int)BurnBackendErrors.Ids.BAContainerPayloadCollision)
341 + .Select(m => m.ToString())
342 + .ToArray();
343 + WixAssert.CompareLineByLine(new string[]
344 + {
345 + "The Payload 'DuplicatePayloadNames.wxs' has a duplicate Name 'fakeba.dll' in the BA container. When extracting the container at runtime, the file will get overwritten.",
346 + "The Payload 'uxTxMXPVMXwQrPTMIGa5WGt93w0Ns' has a duplicate Name 'BootstrapperApplicationData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.",
347 + "The Payload 'uxYRbgitOs0K878jn5L_z7LdJ21KI' has a duplicate Name 'BundleExtensionData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.",
348 + }, baContainerErrors);
349 +
350 + var externalErrors = result.Messages.Where(m => m.Id == (int)BurnBackendErrors.Ids.ExternalPayloadCollision)
351 + .Select(m => m.ToString())
352 + .ToArray();
353 + WixAssert.CompareLineByLine(new string[]
354 + {
355 + "The external Payload 'HiddenPersistedBundleVariable.wxs' has a duplicate Name 'PayloadCollision'. When building the bundle or laying out the bundle, the file will get overwritten.",
356 + "The external Container 'MsiPackagesContainer' has a duplicate Name 'ContainerCollision'. When building the bundle or laying out the bundle, the file will get overwritten.",
357 + }, externalErrors);
358 +
359 + var packageCacheErrors = result.Messages.Where(m => m.Id == (int)BurnBackendErrors.Ids.PackageCachePayloadCollision)
360 + .Select(m => m.ToString())
361 + .ToArray();
362 + WixAssert.CompareLineByLine(new string[]
363 + {
364 + "The Payload 'test.msi' has a duplicate Name 'test.msi' in package 'test.msi'. When caching the package, the file will get overwritten.",
365 + }, packageCacheErrors);
366 +
367 + Assert.Equal(14, result.Messages.Length);
368 }
369 }
370
src/test/WixToolsetTest.CoreIntegration/MsiTransactionFixture.cs
+4 -4
@@ -81,7 +81,7 @@ namespace WixToolsetTest.CoreIntegration
81 Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
82 "-bindpath", Path.Combine(folder, "SingleFile", "data"),
83 "-intermediateFolder", intermediateFolder,
84 - "-o", Path.Combine(binFolder, "FirstX86.msi"),
84 + "-o", Path.Combine(binFolder, "FirstX86", "FirstX86.msi"),
85 });
86
87 result.AssertSuccess();
@@ -94,7 +94,7 @@ namespace WixToolsetTest.CoreIntegration
94 Path.Combine(folder, "ProductWithComponentGroupRef", "Product.wxs"),
95 "-bindpath", Path.Combine(folder, "SingleFile", "data"),
96 "-intermediateFolder", intermediateFolder,
97 - "-o", Path.Combine(binFolder, "SecondX86.msi"),
97 + "-o", Path.Combine(binFolder, "SecondX86", "SecondX86.msi"),
98 });
99
100 result.AssertSuccess();
@@ -108,7 +108,7 @@ namespace WixToolsetTest.CoreIntegration
108 "-bindpath", Path.Combine(folder, "SingleFile", "data"),
109 "-intermediateFolder", intermediateFolder,
110 "-arch", "x64",
111 - "-o", Path.Combine(binFolder, "FirstX64.msi"),
111 + "-o", Path.Combine(binFolder, "FirstX64", "FirstX64.msi"),
112 });
113
114 result.AssertSuccess();
@@ -122,7 +122,7 @@ namespace WixToolsetTest.CoreIntegration
122 "-bindpath", Path.Combine(folder, "SingleFile", "data"),
123 "-intermediateFolder", intermediateFolder,
124 "-arch", "x64",
125 - "-o", Path.Combine(binFolder, "SecondX64.msi"),
125 + "-o", Path.Combine(binFolder, "SecondX64", "SecondX64.msi"),
126 });
127
128 result.AssertSuccess();
src/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs
+24 -2
@@ -2,8 +2,30 @@
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 + <ExePackage Id="DuplicateCacheIds.wxs" SourceFile="$(sys.SOURCEFILEDIR)DuplicateCacheIds.wxs" Compressed="no" DetectCondition="none" Name="PayloadCollision">
8 + <Payload SourceFile="$(sys.SOURCEFILEDIR)BundleVariable.wxs" Compressed="no" Name="ContainerCollision" />
9 + </ExePackage>
10 + <ExePackage Id="HiddenPersistedBundleVariable.wxs" SourceFile="$(sys.SOURCEFILEDIR)HiddenPersistedBundleVariable.wxs" Compressed="no" DetectCondition="none" Name="PayloadCollision" />
11 + <PackageGroupRef Id="MsiPackages" />
12 </PackageGroup>
13 +
14 + <PackageGroup Id="MsiPackages">
15 + <MsiPackage SourceFile="test.msi">
16 + <Payload SourceFile="$(sys.SOURCEFILEDIR)InvalidIds.wxs" Name="MsiPackage\test.txt" />
17 + <Payload SourceFile="$(sys.SOURCEFILEDIR)RegistryKey.wxs" Name="test.msi" />
18 + </MsiPackage>
19 + </PackageGroup>
20 +
21 + <Container Id="MsiPackagesContainer" Type="detached" Name="ContainerCollision">
22 + <PackageGroupRef Id="MsiPackages" />
23 + </Container>
24 +
25 + <BootstrapperApplication>
26 + <Payload Id="DuplicatePayloadNames.wxs" SourceFile="$(sys.SOURCEFILEPATH)" Name="fakeba.dll" />
27 + <Payload Id="UnscheduledPackage.wxs" SourceFile="$(sys.SOURCEFILEDIR)UnscheduledPackage.wxs" Name="BootstrapperApplicationData.xml" />
28 + <Payload Id="UnscheduledRollbackBoundary.wxs" SourceFile="$(sys.SOURCEFILEDIR)UnscheduledRollbackBoundary.wxs" Name="BundleExtensionData.xml" />
29 + </BootstrapperApplication>
30 </Fragment>
31 </Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs
+1 -1
@@ -48,6 +48,6 @@
48 </BundleElement>
49 </BundleCustomDataRef>
50
51 - <BundleExtension Id="CustomTableExtension" SourceFile="fakeba.dll" />
51 + <BundleExtension Id="CustomTableExtension" SourceFile="fakeba.dll" Name="fakebext.dll" />
52 </Fragment>
53 </Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/MsiTransaction/X64AfterX86Bundle.wxs
+4 -4
@@ -2,11 +2,11 @@
2 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <PackageGroup Id="BundlePackages">
5 - <MsiPackage SourceFile="FirstX64.msi" />
5 + <MsiPackage SourceFile="FirstX64\" Name="FirstX64\FirstX64.msi" />
6 <RollbackBoundary Transaction="yes" />
7 - <MsiPackage SourceFile="FirstX86.msi" />
8 - <MsiPackage SourceFile="SecondX86.msi" />
9 - <MsiPackage SourceFile="SecondX64.msi" />
7 + <MsiPackage SourceFile="FirstX86\" Name="FirstX86\FirstX86.msi" />
8 + <MsiPackage SourceFile="SecondX86\" Name="SecondX86\SecondX86.msi" />
9 + <MsiPackage SourceFile="SecondX64\" Name="SecondX64\SecondX64.msi" />
10 </PackageGroup>
11 </Fragment>
12 </Wix>
src/test/WixToolsetTest.CoreIntegration/TestData/MsiTransaction/X86AfterX64Bundle.wxs
+4 -4
@@ -2,11 +2,11 @@
2 <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <PackageGroup Id="BundlePackages">
5 - <MsiPackage SourceFile="FirstX86.msi" />
5 + <MsiPackage SourceFile="FirstX86\" Name="FirstX86\FirstX86.msi" />
6 <RollbackBoundary Transaction="yes" />
7 - <MsiPackage SourceFile="FirstX64.msi" />
8 - <MsiPackage SourceFile="SecondX64.msi" />
9 - <MsiPackage SourceFile="SecondX86.msi" />
7 + <MsiPackage SourceFile="FirstX64\" Name="FirstX64\FirstX64.msi" />
8 + <MsiPackage SourceFile="SecondX64\" Name="SecondX64\SecondX64.msi" />
9 + <MsiPackage SourceFile="SecondX86\" Name="SecondX86\SecondX86.msi" />
10 </PackageGroup>
11 </Fragment>
12 </Wix>