Fix for #7729 to ensure upgradable bundles

This commit is contained in:
Jacques Eloff 2019-03-12 13:51:15 -07:00
parent 9f724f6ac4
commit f87c75a90d
4 changed files with 31 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="$(var.BundleName)" Version="$(var.Version)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)" <Bundle Name="$(var.BundleName)" Version="$(var.BundleVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)"
dep:ProviderKey="$(var.BundleProviderKey)"> dep:ProviderKey="$(var.BundleProviderKey)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense"> <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=320539" <bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=320539"
@ -10,6 +10,19 @@
LocalizationFile="thm.wxl"/> LocalizationFile="thm.wxl"/>
</BootstrapperApplicationRef> </BootstrapperApplicationRef>
<!-- Ensure upgrades from 3.0.0 preview 1, 2, and 3. Conditioned for the 3.0.0 family. -->
<?if $(var.Version)=3.0.0.0?>
<?if $(var.Platform)=x86?>
<RelatedBundle Action="Upgrade" Id="{EC5CFEAE-D169-3A4A-AA09-F446BBC39AD9}"/>
<RelatedBundle Action="Upgrade" Id="{1D6E2BA3-B920-3C74-8F3E-F38E6097A297}"/>
<RelatedBundle Action="Upgrade" Id="{D73B587E-7C85-3418-9B07-6A8469CF7E94}"/>
<?elseif $(var.Platform=x64?>
<RelatedBundle Action="Upgrade" Id="{F5C19B0F-77DF-3353-96D9-3F398FA38CF7}"/>
<RelatedBundle Action="Upgrade" Id="{DFC9DEC7-307D-39B5-AF9C-4E8CE923B1BA}"/>
<RelatedBundle Action="Upgrade" Id="{FDCA5106-C69E-34BB-A3B8-A24ADD0B4769}"/>
<?endif?>
<?endif?>
<!-- Customizations of the default BA --> <!-- Customizations of the default BA -->
<Log Prefix="dd_$(var.BundleLogPrefix)_" Extension=".log" /> <Log Prefix="dd_$(var.BundleLogPrefix)_" Extension=".log" />
<OptionalUpdateRegistration Manufacturer="$(var.BundleRegManufacturer)" ProductFamily="$(var.BundleRegFamily)" Name="$(var.BundleRegName)" /> <OptionalUpdateRegistration Manufacturer="$(var.BundleRegManufacturer)" ProductFamily="$(var.BundleRegFamily)" Name="$(var.BundleRegName)" />

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"> xmlns:dep="http://schemas.microsoft.com/wix/DependencyExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="$(var.BundleName)" Version="$(var.Version)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)" <Bundle Name="$(var.BundleName)" Version="$(var.BundleVersion)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.BundleUpgradeCode)"
dep:ProviderKey="$(var.BundleProviderKey)"> dep:ProviderKey="$(var.BundleProviderKey)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense"> <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=320539" <bal:WixStandardBootstrapperApplication LicenseUrl="https://go.microsoft.com/fwlink/?LinkId=320539"
@ -11,6 +11,13 @@
LocalizationFile="thm.wxl"/> LocalizationFile="thm.wxl"/>
</BootstrapperApplicationRef> </BootstrapperApplicationRef>
<!-- Ensure upgrades from 3.0.0 preview 1 and 2 (Preview 3 was not shipped). Conditioned for the 3.0.0 family. Hosting bundle simships x86/x64 so there's
a single set of upgrade codes. -->
<?if $(var.Version)=3.0.0.0?>
<RelatedBundle Action="Upgrade" Id="{D8BFC3A1-72B1-36C1-9E5A-49FE36A5563B}"/>
<RelatedBundle Action="Upgrade" Id="{EA47395A-BC9B-3ECC-8229-229BC9528DF6}"/>
<?endif?>
<!-- Customizations of the default BA --> <!-- Customizations of the default BA -->
<Log Prefix="dd_$(var.BundleLogPrefix)_" Extension=".log" /> <Log Prefix="dd_$(var.BundleLogPrefix)_" Extension=".log" />
<OptionalUpdateRegistration Manufacturer="$(var.BundleRegManufacturer)" ProductFamily="$(var.BundleRegFamily)" Name="$(var.BundleRegName)" /> <OptionalUpdateRegistration Manufacturer="$(var.BundleRegManufacturer)" ProductFamily="$(var.BundleRegFamily)" Name="$(var.BundleRegName)" />

View File

@ -1,7 +1,10 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<!-- Used for generating stable upgrade codes for bundles -->
<Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).0</Version> <Version>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).0</Version>
<!-- Actual upgrade code used in bundles to ensure upgrades withing a version band, e.g. 3.0.0.xxx -->
<BundleVersion>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion).$(_BuildNumberShortDate)</BundleVersion>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration> <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
<Platform Condition="'$(Platform)' == ''">x64</Platform> <Platform Condition="'$(Platform)' == ''">x64</Platform>
<Lang Condition="'$(Lang)' == ''">ENU</Lang> <Lang Condition="'$(Lang)' == ''">ENU</Lang>

View File

@ -26,15 +26,18 @@
</Target> </Target>
<Target Name="_GenerateBundleGuids" Condition="'$(OutputType)' == 'bundle'"> <Target Name="_GenerateBundleGuids" Condition="'$(OutputType)' == 'bundle'">
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleNameShort);$(GuidInputs)"> <!-- Don't need to use the name of the bundle since we have separate namespace GUIDs. The name will also changes based on the milestone and destabalize
the upgrade code. Bundle upgrades pivot on Major.Minor.Patch changes. For example, 3.0.1-preview 1 can upgrade to 3.0.1-preview 8, but 3.0.1
cannot upgrade to 3.0.2 or 3.1. -->
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion);$(Platform)">
<Output TaskParameter="Guid" PropertyName="BundleProviderKey" /> <Output TaskParameter="Guid" PropertyName="BundleProviderKey" />
</GenerateGuid> </GenerateGuid>
<GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(BundleNameShort);$(GuidInputs);$(OutputType)"> <GenerateGuid NamespaceGuid="$(NamespaceGuid)" Values="$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion);$(AspNetCorePatchVersion);Platform)">
<Output TaskParameter="Guid" PropertyName="BundleUpgradeCode" /> <Output TaskParameter="Guid" PropertyName="BundleUpgradeCode" />
</GenerateGuid> </GenerateGuid>
<PropertyGroup> <PropertyGroup>
<DefineConstants>$(DefineConstants);BundleProviderKey=$(BundleProviderKey);BundleUpgradeCode=$(BundleUpgradeCode)</DefineConstants> <DefineConstants>$(DefineConstants);BundleVersion=$(BundleVersion);BundleProviderKey=$(BundleProviderKey);BundleUpgradeCode=$(BundleUpgradeCode)</DefineConstants>
</PropertyGroup> </PropertyGroup>
</Target> </Target>