Wix MajorUpgrade problems

前端 未结 1 864
天涯浪人
天涯浪人 2021-01-02 11:00

Here\'re the scenarios.

1.) Install 1.0.1.1 then upgrade to 1.0.2.2 ===> This works well (as expected)

2.) Install 1.0.2.2 then downgrade to 1.0.1.1 ===> Thi

1条回答
  •  有刺的猬
    2021-01-02 11:21

    This is behaving as mentioned in the WIX documentation. You need to set the below property to "Yes" in the MajorUpgrade element to handle this scenario. Read the highlighted text for more details.

    AllowSameVersionUpgrades (YesNoType)

    When set to no (the default), installing a product with the same version and upgrade code (but different product code) is allowed and treated by MSI as two products. When set to yes, WiX sets the msidbUpgradeAttributesVersionMaxInclusive attribute, which tells MSI to treat a product with the same version as a major upgrade.

    This is useful when two product versions differ only in the fourth version field. MSI specifically ignores that field when comparing product versions, so two products that differ only in the fourth version field are the same product and need this attribute set to yes to be detected.

    Note that because MSI ignores the fourth product version field, setting this attribute to yes also allows downgrades when the first three product version fields are identical. For example, product version 1.0.0.1 will "upgrade" 1.0.0.2998 because they're seen as the same version (1.0.0). That could reintroduce serious bugs so the safest choice is to change the first three version fields and omit this attribute to get the default of no.

    This attribute cannot be "yes" when AllowDowngrades is also "yes" -- AllowDowngrades already allows two products with the same version number to upgrade each other.

    Source: WIX Documentation

    0 讨论(0)
提交回复
热议问题