@joebigelow / wix / commits / 9e461b97

Fix build failure when bundle has multiple RemoteBundle elements

Nir Bar committed Apr 23, 2023 at 07:55 UTC 9e461b979d694a944061ef43529c847f1a5bd43a
5 files changed +49 -2
src/api/wix/WixToolset.Data/Symbols/WixBundleHarvestedDependencyProviderSymbol.cs
+1 -1
@@ -17,7 +17,7 @@ namespace WixToolset.Data
17 new IntermediateFieldDefinition(nameof(WixBundleHarvestedDependencyProviderSymbolFields.DisplayName), IntermediateFieldType.String),
18 new IntermediateFieldDefinition(nameof(WixBundleHarvestedDependencyProviderSymbolFields.ProviderAttributes), IntermediateFieldType.Number),
19 },
20 - typeof(WixDependencyProviderSymbol));
20 + typeof(WixBundleHarvestedDependencyProviderSymbol));
21 }
22 }
23
src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wixproj new
+17
@@ -0,0 +1,17 @@
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">
3 + <PropertyGroup>
4 + <OutputType>Bundle</OutputType>
5 + <UpgradeCode>{AB842E3A-8212-4D74-B407-C252D9E269F9}</UpgradeCode>
6 + </PropertyGroup>
7 + <ItemGroup>
8 + <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9 + </ItemGroup>
10 + <ItemGroup>
11 + <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
12 + </ItemGroup>
13 + <ItemGroup>
14 + <PackageReference Include="WixToolset.Bal.wixext" />
15 + <PackageReference Include="WixToolset.NetFx.wixext" />
16 + </ItemGroup>
17 +</Project>
src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wxs new
+20
@@ -0,0 +1,20 @@
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 +
4 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <Fragment>
6 + <PackageGroup Id="BundlePackages">
7 + <BundlePackage Id="ASP.Net_Core_6.0" Permanent="yes">
8 + <BundlePackagePayload Id="ASP.Net_Core_6.0" Name="aspnetcore-runtime-6.0.10-win-x64.exe" ProductName="Microsoft ASP.NET Core 6.0.10 - Shared Framework (x64)" Description="Microsoft ASP.NET Core 6.0.10 - Shared Framework (x64)" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/2370bcad-45b1-4ccb-bc61-21ffd7116d63/1aa8efcabfb60ee778b913a5eb237a56/aspnetcore-runtime-6.0.10-win-x64.exe" Hash="4AF8DA7DE85BCB1D079A85CD3F4AAFDFC4E4D441B87DFCDFFC27C820D9F69513341BE5ACC987C47CACDC597CBC0CC89C7D746050E6D40AE02DB7391E8214352D" Size="8997144" Version="6.0.10.22476">
9 + <RemoteBundle BundleId="{5D69246A-5874-401D-9879-ECC18D5A1BAB}" DisplayName="Microsoft ASP.NET Core 6.0.10 - Shared Framework (x64)" InstallSize="22958021" ManifestNamespace="http://schemas.microsoft.com/wix/2008/Burn" PerMachine="yes" ProviderKey="{5d69246a-5874-401d-9879-ecc18d5a1bab}" ProtocolVersion="1" Version="6.0.10.22476" Win64="no" UpgradeCode="{B7C4CC53-CE40-39E9-9F43-81CE9F5CD47C}" />
10 + </BundlePackagePayload>
11 + </BundlePackage>
12 +
13 + <BundlePackage Id="Dotnet_Runtime_6.0" Permanent="yes">
14 + <BundlePackagePayload Id="Dotnet_Runtime_6.0" Name="dotnet-runtime-6.0.10-win-x64.exe" ProductName="Microsoft .NET Runtime - 6.0.10 (x64)" Description="Microsoft .NET Runtime - 6.0.10 (x64)" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/50336bc7-7fd1-4a12-b5a2-81ce0219edf9/8d862413975808de0d835888e41e49a7/dotnet-runtime-6.0.10-win-x64.exe" Hash="23E4C862AFEF34A2C0D6476A93274CE0158D28F1609E0404737663E4BE17263E61E5A8760382FB125D288A0965394E3D04B9E1C77F99DE80A2C590DD295B8732" Size="27912752" Version="6.0.10.31726">
15 + <RemoteBundle BundleId="{9A89127E-80A4-45FB-AD62-58F72634274A}" DisplayName="Microsoft .NET Runtime - 6.0.10 (x64)" InstallSize="71462036" ManifestNamespace="http://schemas.microsoft.com/wix/2008/Burn" PerMachine="yes" ProviderKey="{9a89127e-80a4-45fb-ad62-58f72634274a}" ProtocolVersion="1" Version="6.0.10.31726" Win64="no" UpgradeCode="{B19A028F-5C89-7AF4-5102-0F8ED67CCACA}" />
16 + </BundlePackagePayload>
17 + </BundlePackage>
18 + </PackageGroup>
19 + </Fragment>
20 +</Wix>
src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs
+10
@@ -13,6 +13,16 @@ namespace WixToolsetTest.BurnE2E
13 {
14 public BundlePackageTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { }
15
16 + [RuntimeFact]
17 + public void CanBuildBundlePackagesWithRemoteBundles()
18 + {
19 + var multipleBundlePackagesWithRemoteBundle = this.CreateBundleInstaller("MultipleBundlePackagesWithRemoteBundle");
20 +
21 + multipleBundlePackagesWithRemoteBundle.Install();
22 + // Bundle only contains permanent packages, so it isn't registered
23 + multipleBundlePackagesWithRemoteBundle.VerifyUnregisteredAndRemovedFromPackageCache();
24 + }
25 +
26 [RuntimeFact]
27 public void CanInstallAndUninstallBundlePackages()
28 {
src/wix/WixToolset.Core/Compiler_Bundle.cs
+1 -1
@@ -2855,7 +2855,7 @@ namespace WixToolset.Core
2855 Action = RelatedBundleActionType.Upgrade,
2856 });
2857
2858 - var depId = new Identifier(AccessModifier.Section, this.Core.CreateIdentifier("dep", packagePayloadId, providerKey));
2858 + var depId = this.Core.CreateIdentifier("dep", packagePayloadId, providerKey);
2859 this.Core.AddSymbol(new WixBundleHarvestedDependencyProviderSymbol(sourceLineNumbers, depId)
2860 {
2861 PackagePayloadRef = packagePayloadId,