Skip to content

Commit 12bd4e8

Browse files
authored
Correct bundle upgrade behavior for 2.1 (#27079)
* Correct bundle upgrade behavior for 2.1 * Update Wix.targets
1 parent 1c1c059 commit 12bd4e8

File tree

6 files changed

+173
-6
lines changed

6 files changed

+173
-6
lines changed

src/Installers/Windows/SharedFrameworkBundle/Bundle.wxs

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,124 @@
1010
LocalizationFile="thm.wxl"/>
1111
</BootstrapperApplicationRef>
1212

13+
<!-- Ensure upgrades from 2.1.0 thru 2.1.23 for x64. -->
14+
<?if $(var.MajorVersion)=2 and $(var.MinorVersion)=1?>
15+
<?if $(var.Platform)=x64?>
16+
<!--'Microsoft ASP.NET Core 2.1.23 - Shared Framework'-->
17+
<RelatedBundle Id="{0712373C-EAC4-36FA-A33F-21A63858EFA7}" Action="Upgrade" />
18+
<!--'Microsoft ASP.NET Core 2.1.22 - Shared Framework'-->
19+
<RelatedBundle Id="{49A46B72-F6E0-33CF-8135-875A76045F10}" Action="Upgrade" />
20+
<!--'Microsoft ASP.NET Core 2.1.21 - Shared Framework'-->
21+
<RelatedBundle Id="{3128CBDD-47D8-345B-8416-993E028BBBE2}" Action="Upgrade" />
22+
<!--'Microsoft ASP.NET Core 2.1.20 - Shared Framework'-->
23+
<RelatedBundle Id="{DBBB894A-16EA-33DF-A1AD-17A1C07B1FE3}" Action="Upgrade" />
24+
<!--'Microsoft ASP.NET Core 2.1.19 - Shared Framework'-->
25+
<RelatedBundle Id="{27F55CDC-C188-3DB7-8020-94AF8144243A}" Action="Upgrade" />
26+
<!--'Microsoft ASP.NET Core 2.1.18 - Shared Framework'-->
27+
<RelatedBundle Id="{3589369F-8952-3A99-B102-2F40B673B7A7}" Action="Upgrade" />
28+
<!--'Microsoft ASP.NET Core 2.1.17 - Shared Framework'-->
29+
<RelatedBundle Id="{4A3B5396-5326-36CB-974C-D03F7442C9F1}" Action="Upgrade" />
30+
<!--'Microsoft ASP.NET Core 2.1.16 - Shared Framework'-->
31+
<RelatedBundle Id="{1D763AE0-563D-315B-97D9-A3026619AA1E}" Action="Upgrade" />
32+
<!--'Microsoft ASP.NET Core 2.1.15 - Shared Framework'-->
33+
<RelatedBundle Id="{E4FAADFB-4273-38A7-8E01-3E0E1FE40CFD}" Action="Upgrade" />
34+
<!--'Microsoft ASP.NET Core 2.1.14 - Shared Framework'-->
35+
<RelatedBundle Id="{E0D6C0F1-C362-3697-AD4F-BC3967BE1F68}" Action="Upgrade" />
36+
<!--'Microsoft ASP.NET Core 2.1.13 - Shared Framework'-->
37+
<RelatedBundle Id="{7683D539-563A-3F4D-9664-79FA52E7A893}" Action="Upgrade" />
38+
<!--'Microsoft ASP.NET Core 2.1.12 - Shared Framework'-->
39+
<RelatedBundle Id="{BA2E3A8D-6118-3CC3-BD81-51B0AA4A165C}" Action="Upgrade" />
40+
<!--'Microsoft ASP.NET Core 2.1.11 - Shared Framework'-->
41+
<RelatedBundle Id="{CF0DE7B0-8EFA-39EF-B413-13EE8C657BA7}" Action="Upgrade" />
42+
<!--'Microsoft ASP.NET Core 2.1.10 - Shared Framework'-->
43+
<RelatedBundle Id="{F5DA7AD4-9479-3B3F-97D4-469AD07209EF}" Action="Upgrade" />
44+
<!--'Microsoft ASP.NET Core 2.1.9 - Shared Framework'-->
45+
<RelatedBundle Id="{403E8DE6-3564-3C10-B86F-9C697A4B89ED}" Action="Upgrade" />
46+
<!--'Microsoft ASP.NET Core 2.1.8 - Shared Framework'-->
47+
<RelatedBundle Id="{38580A17-729D-376F-AC0D-B8E80E77CE20}" Action="Upgrade" />
48+
<!--'Microsoft ASP.NET Core 2.1.7 - Shared Framework'-->
49+
<RelatedBundle Id="{05D79AF1-C5B9-39AB-95B8-8BEEB5F6EE8D}" Action="Upgrade" />
50+
<!--'Microsoft ASP.NET Core 2.1.6 - Shared Framework'-->
51+
<RelatedBundle Id="{DCC2A848-E51F-3525-9AEC-6F3AD09E8E4E}" Action="Upgrade" />
52+
<!--'Microsoft ASP.NET Core 2.1.5 - Shared Framework'-->
53+
<RelatedBundle Id="{4FF26B15-D19E-33DE-B3B9-0048CB452719}" Action="Upgrade" />
54+
<!--'Microsoft ASP.NET Core 2.1.4 - Shared Framework'-->
55+
<RelatedBundle Id="{516DDC47-3178-3854-80B3-69A5924BA645}" Action="Upgrade" />
56+
<!--'Microsoft ASP.NET Core 2.1.3 - Shared Framework'-->
57+
<RelatedBundle Id="{AED22235-ACC3-38AD-8AA6-3A05CA2D3ADA}" Action="Upgrade" />
58+
<!--'Microsoft ASP.NET Core 2.1.2 - Shared Framework'-->
59+
<RelatedBundle Id="{842F7946-BF3F-30F0-9136-68B9666857CC}" Action="Upgrade" />
60+
<!--'Microsoft ASP.NET Core 2.1.1 - Shared Framework'-->
61+
<RelatedBundle Id="{54785C17-D593-3E17-B4DB-71204B69804B}" Action="Upgrade" />
62+
<!--'Microsoft ASP.NET Core 2.1.0 - Shared Framework'-->
63+
<RelatedBundle Id="{30CB480C-ADF0-3B81-8F50-48376E153BFA}" Action="Upgrade" />
64+
<!--'Microsoft ASP.NET Core 2.1.0 Release Candidate 1 - Shared Framework'-->
65+
<RelatedBundle Id="{83D09AED-0BC7-3254-A011-2FDCF79D8859}" Action="Upgrade" />
66+
<!--'Microsoft ASP.NET Core 2.1.0 Preview 2 - Shared Framework'-->
67+
<RelatedBundle Id="{9E1909B0-7040-3B58-9F51-1862DA343256}" Action="Upgrade" />
68+
<!--'Microsoft ASP.NET Core 2.1.0 Preview 1 - Shared Framework'-->
69+
<RelatedBundle Id="{1434C698-C3C8-3021-BAAC-F65A5139E5D0}" Action="Upgrade" />
70+
<?endif?>
71+
72+
<!-- Ensure upgrades from 2.1.0 thru 2.1.23 for x86. -->
73+
<?if $(var.Platform)=x86?>
74+
<!--'Microsoft ASP.NET Core 2.1.23 - Shared Framework'-->
75+
<RelatedBundle Id="{09248E80-C295-3428-8EB4-3159552244EC}" Action="Upgrade" />
76+
<!--'Microsoft ASP.NET Core 2.1.22 - Shared Framework'-->
77+
<RelatedBundle Id="{5ECAAEF0-4844-306B-95BC-39F74570FB71}" Action="Upgrade" />
78+
<!--'Microsoft ASP.NET Core 2.1.21 - Shared Framework'-->
79+
<RelatedBundle Id="{5946602B-3AF7-367E-A2F6-C8D55D02765F}" Action="Upgrade" />
80+
<!--'Microsoft ASP.NET Core 2.1.20 - Shared Framework'-->
81+
<RelatedBundle Id="{B87377E1-C127-3725-9A17-E2CFB1924939}" Action="Upgrade" />
82+
<!--'Microsoft ASP.NET Core 2.1.19 - Shared Framework'-->
83+
<RelatedBundle Id="{3CE4046A-E352-3CD4-B33F-AB6975DABD48}" Action="Upgrade" />
84+
<!--'Microsoft ASP.NET Core 2.1.18 - Shared Framework'-->
85+
<RelatedBundle Id="{516B48A4-1C41-3C71-824A-EFDE2FFBE460}" Action="Upgrade" />
86+
<!--'Microsoft ASP.NET Core 2.1.17 - Shared Framework'-->
87+
<RelatedBundle Id="{502432A7-056C-36AE-A063-8C666325C085}" Action="Upgrade" />
88+
<!--'Microsoft ASP.NET Core 2.1.16 - Shared Framework'-->
89+
<RelatedBundle Id="{BE23E50E-87CB-36A0-BF02-B9454F54E485}" Action="Upgrade" />
90+
<!--'Microsoft ASP.NET Core 2.1.15 - Shared Framework'-->
91+
<RelatedBundle Id="{1974CAA5-06EF-3B2A-B1C0-642820CAE7AD}" Action="Upgrade" />
92+
<!--'Microsoft ASP.NET Core 2.1.14 - Shared Framework'-->
93+
<RelatedBundle Id="{00131A6A-FBEE-3D58-9675-D3625F20F443}" Action="Upgrade" />
94+
<!--'Microsoft ASP.NET Core 2.1.13 - Shared Framework'-->
95+
<RelatedBundle Id="{12D8AEA0-C9C1-3816-83E6-52205C27F9EF}" Action="Upgrade" />
96+
<!--'Microsoft ASP.NET Core 2.1.12 - Shared Framework'-->
97+
<RelatedBundle Id="{6B055917-6871-3F6A-9DB8-136CAAC94FC1}" Action="Upgrade" />
98+
<!--'Microsoft ASP.NET Core 2.1.11 - Shared Framework'-->
99+
<RelatedBundle Id="{54D6799C-AA5C-3FBE-8F8D-D7A1BA02E080}" Action="Upgrade" />
100+
<!--'Microsoft ASP.NET Core 2.1.10 - Shared Framework'-->
101+
<RelatedBundle Id="{20D074C5-A251-3387-8E5B-DB9840D97199}" Action="Upgrade" />
102+
<!--'Microsoft ASP.NET Core 2.1.9 - Shared Framework'-->
103+
<RelatedBundle Id="{6CA73165-99C8-3A40-A5DE-B52563E54B36}" Action="Upgrade" />
104+
<!--'Microsoft ASP.NET Core 2.1.8 - Shared Framework'-->
105+
<RelatedBundle Id="{70D80ED0-BE96-30CF-8BD8-CDEB74A1FA44}" Action="Upgrade" />
106+
<!--'Microsoft ASP.NET Core 2.1.7 - Shared Framework'-->
107+
<RelatedBundle Id="{35188EAF-50A8-36B1-89E1-65A048879A8A}" Action="Upgrade" />
108+
<!--'Microsoft ASP.NET Core 2.1.6 - Shared Framework'-->
109+
<RelatedBundle Id="{52B39EEB-6453-35C7-82C3-0A3E32D7A7E3}" Action="Upgrade" />
110+
<!--'Microsoft ASP.NET Core 2.1.5 - Shared Framework'-->
111+
<RelatedBundle Id="{2396ABF1-286C-35AC-9D73-6DA0C1488697}" Action="Upgrade" />
112+
<!--'Microsoft ASP.NET Core 2.1.4 - Shared Framework'-->
113+
<RelatedBundle Id="{C43E83C3-55D5-339B-9AEB-CCF6EF0C3E88}" Action="Upgrade" />
114+
<!--'Microsoft ASP.NET Core 2.1.3 - Shared Framework'-->
115+
<RelatedBundle Id="{D629A358-61C2-326F-A491-55E29C064E30}" Action="Upgrade" />
116+
<!--'Microsoft ASP.NET Core 2.1.2 - Shared Framework'-->
117+
<RelatedBundle Id="{649622E9-21EF-3C33-8121-3AE51E01ECD8}" Action="Upgrade" />
118+
<!--'Microsoft ASP.NET Core 2.1.1 - Shared Framework'-->
119+
<RelatedBundle Id="{B71D596D-762B-343B-AA62-A49344C9C5E8}" Action="Upgrade" />
120+
<!--'Microsoft ASP.NET Core 2.1.0 - Shared Framework'-->
121+
<RelatedBundle Id="{E880C10C-463E-3D37-AD6E-EAF52D736BCB}" Action="Upgrade" />
122+
<!--'Microsoft ASP.NET Core 2.1.0 Release Candidate 1 - Shared Framework'-->
123+
<RelatedBundle Id="{6E0B3327-43F4-3EE3-9E64-6C395C2CFFA8}" Action="Upgrade" />
124+
<!--'Microsoft ASP.NET Core 2.1.0 Preview 2 - Shared Framework'-->
125+
<RelatedBundle Id="{87DA165A-7B38-3BE2-8954-F4D3237E5CE5}" Action="Upgrade" />
126+
<!--'Microsoft ASP.NET Core 2.1.0 Preview 1 - Shared Framework'-->
127+
<RelatedBundle Id="{2F9AD35A-B7C3-3CCF-9ADA-EFBC876815F8}" Action="Upgrade" />
128+
<?endif?>
129+
<?endif?>
130+
13131
<!-- Customizations of the default BA -->
14132
<Log Prefix="dd_$(var.BundleLogPrefix)_" Extension=".log" />
15133
<OptionalUpdateRegistration Manufacturer="$(var.BundleRegManufacturer)" ProductFamily="$(var.BundleRegFamily)" Name="$(var.BundleRegName)" />

src/Installers/Windows/SharedFrameworkBundle/Product.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727
<DefineConstants>$(DefineConstants);BundleRegManufacturer=$(BundleRegManufacturer)</DefineConstants>
2828
<DefineConstants>$(DefineConstants);BundleRegFamily=$(BundleRegFamily)</DefineConstants>
2929
<DefineConstants>$(DefineConstants);BundleRegName=$(BundleRegName)</DefineConstants>
30+
<DefineConstants>$(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion)</DefineConstants>
31+
<DefineConstants>$(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion)</DefineConstants>
3032
</PropertyGroup>
3133
</Project>

src/Installers/Windows/WindowsHostingBundle/Bundle.wxs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,50 @@
1111
LocalizationFile="thm.wxl"/>
1212
</BootstrapperApplicationRef>
1313

14+
<!-- Ensure upgrades from 2.1.0 thru 2.1.23 for x64. -->
15+
<?if $(var.MajorVersion)=2 and $(var.MinorVersion)=1?>
16+
<!--'Microsoft .NET Core 2.1.23 - Windows Server Hosting'-->
17+
<RelatedBundle Id="{51DC181C-C29B-31D7-96CA-08B2B9322269}" Action="Upgrade" />
18+
<!--'Microsoft .NET Core 2.1.22 - Windows Server Hosting'-->
19+
<RelatedBundle Id="{0629F7DA-FD3D-3C43-9C74-7CAB326D8408}" Action="Upgrade" />
20+
<!--'Microsoft .NET Core 2.1.21 - Windows Server Hosting'-->
21+
<RelatedBundle Id="{20C43973-8701-31FF-B9F4-ED31D88182AC}" Action="Upgrade" />
22+
<!--'Microsoft .NET Core 2.1.20 - Windows Server Hosting'-->
23+
<RelatedBundle Id="{AB66B18F-8B14-3FF3-A5F1-97435938BA40}" Action="Upgrade" />
24+
<!--'Microsoft .NET Core 2.1.19 - Windows Server Hosting'-->
25+
<RelatedBundle Id="{9A7F3800-1BCF-3C0A-B1B2-948D6AE80CCB}" Action="Upgrade" />
26+
<!--'Microsoft .NET Core 2.1.18 - Windows Server Hosting'-->
27+
<RelatedBundle Id="{B137EB6B-4CBA-32A0-A4E7-D2B8F3FE334A}" Action="Upgrade" />
28+
<!--'Microsoft .NET Core 2.1.17 - Windows Server Hosting'-->
29+
<RelatedBundle Id="{F0A8977D-AA93-3745-9727-1DBAD0EC9BA4}" Action="Upgrade" />
30+
<!--'Microsoft .NET Core 2.1.16 - Windows Server Hosting'-->
31+
<RelatedBundle Id="{C9D00CC1-53C8-38DD-85C5-F07298DCE93C}" Action="Upgrade" />
32+
<!--'Microsoft .NET Core 2.1.15 - Windows Server Hosting'-->
33+
<RelatedBundle Id="{7CBFCC91-2F4E-3C4F-9F02-269BF67D0EF3}" Action="Upgrade" />
34+
<!--'Microsoft .NET Core 2.1.14 - Windows Server Hosting'-->
35+
<RelatedBundle Id="{790FD6ED-06E1-3CA0-B4FA-8CC0690001F5}" Action="Upgrade" />
36+
<!--'Microsoft .NET Core 2.1.12 - Windows Server Hosting'-->
37+
<RelatedBundle Id="{127E0E5D-65E8-339B-9E56-710CD7CAE521}" Action="Upgrade" />
38+
<!--'Microsoft .NET Core 2.1.11 - Windows Server Hosting'-->
39+
<RelatedBundle Id="{3B4D8EC5-02AC-3F77-9ECE-83B92C6232D9}" Action="Upgrade" />
40+
<!--'Microsoft .NET Core 2.1.10 - Windows Server Hosting'-->
41+
<RelatedBundle Id="{A265BA58-64C8-31B5-92DC-7C071095667E}" Action="Upgrade" />
42+
<!--'Microsoft .NET Core 2.1.9 - Windows Server Hosting'-->
43+
<RelatedBundle Id="{91B539CE-A269-32B4-8EB9-66A3285DED97}" Action="Upgrade" />
44+
<!--'Microsoft .NET Core 2.1.8 - Windows Server Hosting'-->
45+
<RelatedBundle Id="{9F1D5735-B2F6-3C74-8F6B-2390BB739697}" Action="Upgrade" />
46+
<!--'Microsoft .NET Core 2.1.7 - Windows Server Hosting'-->
47+
<RelatedBundle Id="{E5555A4A-7AF5-3733-BB60-EC74A4874842}" Action="Upgrade" />
48+
<!--'Microsoft .NET Core 2.1.6 - Windows Server Hosting'-->
49+
<RelatedBundle Id="{EC44441A-0A96-39C4-A4A3-C6D65FEA6E3C}" Action="Upgrade" />
50+
<!--'Microsoft .NET Core 2.1.5 - Windows Server Hosting'-->
51+
<RelatedBundle Id="{E22164E9-31C6-3C19-8FB9-F9EA2711EEAC}" Action="Upgrade" />
52+
<!--'Microsoft .NET Core 2.1.4 - Windows Server Hosting'-->
53+
<RelatedBundle Id="{38010573-29EA-472C-91FA-779DC0A6CDED}" Action="Upgrade" />
54+
<!--'Microsoft .NET Core 2.1.3 - Windows Server Hosting'-->
55+
<RelatedBundle Id="{0ECB5C6B-3FD7-36C2-8138-61AE2E999E76}" Action="Upgrade" />
56+
<?endif?>
57+
1458
<!-- Customizations of the default BA -->
1559
<Log Prefix="dd_$(var.BundleLogPrefix)_" Extension=".log" />
1660
<OptionalUpdateRegistration Manufacturer="$(var.BundleRegManufacturer)" ProductFamily="$(var.BundleRegFamily)" Name="$(var.BundleRegName)" />

src/Installers/Windows/WindowsHostingBundle/Product.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,7 @@
2727
<DefineConstants>$(DefineConstants);BundleRegManufacturer=$(BundleRegManufacturer)</DefineConstants>
2828
<DefineConstants>$(DefineConstants);BundleRegFamily=$(BundleRegFamily)</DefineConstants>
2929
<DefineConstants>$(DefineConstants);BundleRegName=$(BundleRegName)</DefineConstants>
30+
<DefineConstants>$(DefineConstants);MajorVersion=$(AspNetCoreMajorVersion)</DefineConstants>
31+
<DefineConstants>$(DefineConstants);MinorVersion=$(AspNetCoreMinorVersion)</DefineConstants>
3032
</PropertyGroup>
3133
</Project>

src/Installers/Windows/Wix.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).0</Version>
4+
<Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).$(BuildNumber)</Version>
55
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
66
<Platform Condition="'$(Platform)' == ''">x64</Platform>
77
<Lang Condition="'$(Lang)' == ''">ENU</Lang>

src/Installers/Windows/Wix.targets

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@
66
</PropertyGroup>
77

88
<PropertyGroup>
9-
<GuidInputs>$(Version);$(Platform);$(BuildNumber)</GuidInputs>
9+
<PackageGuidInputs>$(Version);$(Platform)</PackageGuidInputs>
10+
<BundleGuidInputs>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion);$(Platform)</BundleGuidInputs>
1011
</PropertyGroup>
1112

1213
<UsingTask AssemblyFile="$(OutputPath)..\InstallerTasks\InstallerTasks.dll" TaskName="RepoTasks.GenerateGuid" />
1314

1415
<Target Name="GenerateGUIDs" BeforeTargets="BeforeBuild" DependsOnTargets="_GeneratePackageGuids;_GenerateBundleGuids" Condition=" '$(DisableGuidGeneration)' != 'true' " />
1516

1617
<Target Name="_GeneratePackageGuids" Condition="'$(OutputType)' == 'package'">
17-
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(GuidInputs)">
18+
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(PackageGuidInputs)">
1819
<Output TaskParameter="Guid" PropertyName="ProductCode" />
1920
</GenerateGuid>
20-
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(GuidInputs);$(OutputType)">
21+
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(ProductNameShort);$(PackageGuidInputs);$(OutputType)">
2122
<Output TaskParameter="Guid" PropertyName="UpgradeCode" />
2223
</GenerateGuid>
2324

@@ -27,10 +28,10 @@
2728
</Target>
2829

2930
<Target Name="_GenerateBundleGuids" Condition="'$(OutputType)' == 'bundle'">
30-
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleNameShort);$(GuidInputs)">
31+
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleNameShort);$(BundleGuidInputs)">
3132
<Output TaskParameter="Guid" PropertyName="BundleProviderKey" />
3233
</GenerateGuid>
33-
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleNameShort);$(GuidInputs);$(OutputType)">
34+
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleNameShort);$(BundleGuidInputs);$(OutputType)">
3435
<Output TaskParameter="Guid" PropertyName="BundleUpgradeCode" />
3536
</GenerateGuid>
3637

0 commit comments

Comments
 (0)