diff options
| author | Bob Arnson <bob@firegiant.com> | 2024-06-29 22:04:35 -0400 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2024-07-15 15:14:09 -0400 |
| commit | c597f0e32c9d7836af317a5576138337ee05791a (patch) | |
| tree | 3742a5ca11a793de62cc711643e3682431745e53 | |
| parent | 85c08f6272e98ce79b520b667f228975aee4c42d (diff) | |
| download | wix-bob/Fixes.240629.tar.gz wix-bob/Fixes.240629.tar.bz2 wix-bob/Fixes.240629.zip | |
Exclude detect-only Upgrades from default-feature.bob/Fixes.240629
Fixes https://github.com/wixtoolset/issues/issues/8125
3 files changed, 6 insertions, 10 deletions
diff --git a/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs b/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs index 3d5280a2..b433b039 100644 --- a/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs +++ b/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs | |||
| @@ -56,8 +56,7 @@ namespace WixToolset.Core.Link | |||
| 56 | // conjure a default major upgrade with the stdlib localization string for the | 56 | // conjure a default major upgrade with the stdlib localization string for the |
| 57 | // downgrade error message. | 57 | // downgrade error message. |
| 58 | var symbols = this.Sections.SelectMany(section => section.Symbols); | 58 | var symbols = this.Sections.SelectMany(section => section.Symbols); |
| 59 | var upgradeSymbols = symbols.OfType<UpgradeSymbol>(); | 59 | if (!symbols.OfType<UpgradeSymbol>().Any(us => !us.OnlyDetect)) |
| 60 | if (!upgradeSymbols.Any()) | ||
| 61 | { | 60 | { |
| 62 | var packageSymbol = this.Find.EntrySection.Symbols.OfType<WixPackageSymbol>().FirstOrDefault(); | 61 | var packageSymbol = this.Find.EntrySection.Symbols.OfType<WixPackageSymbol>().FirstOrDefault(); |
| 63 | 62 | ||
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs index ce9fd96f..95ebcd94 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs | |||
| @@ -1,12 +1,8 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
| 2 | <Package Name="MajorUpgradeDowngradeMessage" Language="1033" Version="2.0.0" Manufacturer="Example Corporation" UpgradeCode="7ab24276-c628-43db-9e65-a184d052909b" Scope="perMachine"> | 2 | <Package Name="MajorUpgradeDowngradeMessage" Language="1033" Version="2.0.0" Manufacturer="Example Corporation" UpgradeCode="7ab24276-c628-43db-9e65-a184d052909b" Scope="perMachine"> |
| 3 | <Feature Id="ProductFeature" Title="MsiPackageTitle"> | ||
| 4 | </Feature> | ||
| 5 | </Package> | ||
| 6 | 3 | ||
| 7 | <Fragment> | 4 | <Property Id="PRODUCT"> |
| 8 | <StandardDirectory Id="ProgramFiles6432Folder"> | 5 | <ProductSearch UpgradeCode="{46649344-6CDF-4531-B91C-DCC088CBF6D3}" Minimum="1.0" /> |
| 9 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | 6 | </Property> |
| 10 | </StandardDirectory> | 7 | </Package> |
| 11 | </Fragment> | ||
| 12 | </Wix> | 8 | </Wix> |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs index 2d2c0703..49c83c07 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs | |||
| @@ -68,6 +68,7 @@ namespace WixToolsetTest.CoreIntegration | |||
| 68 | WixAssert.CompareLineByLine(new[] | 68 | WixAssert.CompareLineByLine(new[] |
| 69 | { | 69 | { |
| 70 | "LaunchCondition:NOT WIX_DOWNGRADE_DETECTED\tA newer version of [ProductName] is already installed.", | 70 | "LaunchCondition:NOT WIX_DOWNGRADE_DETECTED\tA newer version of [ProductName] is already installed.", |
| 71 | "Upgrade:{46649344-6CDF-4531-B91C-DCC088CBF6D3}\t1.0\t\t\t258\t\tPRODUCT", | ||
| 71 | "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t\t2.0.0\t1033\t1\t\tWIX_UPGRADE_DETECTED", | 72 | "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t\t2.0.0\t1033\t1\t\tWIX_UPGRADE_DETECTED", |
| 72 | "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t2.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", | 73 | "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t2.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", |
| 73 | }, results); | 74 | }, results); |
