C# Класс WixSharp.MajorUpgrade

Simplifies authoring for major upgrades, including support for preventing downgrades.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
AllowDowngrades bool?
AllowSameVersionUpgrades bool?
Disallow bool?
DisallowUpgradeErrorMessage string
DowngradeErrorMessage string
IgnoreRemoveFailure bool?
MigrateFeatures bool?
RemoveFeatures string
Schedule UpgradeSchedule?

Открытые методы

Метод Описание
ToXml ( ) : System.Xml.Linq.XContainer[]

Emits WiX XML.

Описание методов

ToXml() публичный Метод

Emits WiX XML.
public ToXml ( ) : System.Xml.Linq.XContainer[]
Результат System.Xml.Linq.XContainer[]

Описание свойств

AllowDowngrades публичное свойство

When set to "false" (the default), products with lower version numbers are blocked from installing when a product with a higher version is installed; the DowngradeErrorMessage attribute must also be specified.

When set to "true", any version can be installed over any other version.

public bool? AllowDowngrades
Результат bool?

AllowSameVersionUpgrades публичное свойство

When set to "false" (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 "true" 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 "true" when AllowDowngrades is also "true" -- AllowDowngrades already allows two products with the same version number to upgrade each other.

public bool? AllowSameVersionUpgrades
Результат bool?

Disallow публичное свойство

When set to "true", products with higher version numbers are blocked from installing when a product with a lower version is installed; the UpgradeErrorMessage attribute must also be specified.

When set to "false" (the default), any version can be installed over any lower version.

public bool? Disallow
Результат bool?

DisallowUpgradeErrorMessage публичное свойство

The message displayed if users try to install a product with a higher version number when a product with a lower version is installed. Used only when Disallow is "true".
public string DisallowUpgradeErrorMessage
Результат string

DowngradeErrorMessage публичное свойство

The message displayed if users try to install a product with a lower version number when a product with a higher version is installed. Used only when AllowDowngrades is "false" (the default).
public string DowngradeErrorMessage
Результат string

IgnoreRemoveFailure публичное свойство

When set to "true", failures removing the installed product during the upgrade will be ignored. When set to "false" (the default), failures removing the installed product during the upgrade will be considered a failure and, depending on the scheduling, roll back the upgrade.
public bool? IgnoreRemoveFailure
Результат bool?

MigrateFeatures публичное свойство

When set to "true" (the default), the MigrateFeatureStates standard action will set the feature states of the upgrade product to those of the installed product.

When set to "false", the installed features have no effect on the upgrade installation

public bool? MigrateFeatures
Результат bool?

RemoveFeatures публичное свойство

A formatted string that contains the list of features to remove from the installed product. The default is to remove all features. Note that if you use formatted property values that evaluate to an empty string, no features will be removed; only omitting this attribute defaults to removing all features.
public string RemoveFeatures
Результат string

Schedule публичное свойство

Determines the scheduling of the RemoveExistingProducts standard action, which is when the installed product is removed. The default is "afterInstallValidate" which removes the installed product entirely before installing the upgrade product. It's slowest but gives the most flexibility in changing components and features in the upgrade product.
public UpgradeSchedule? Schedule
Результат UpgradeSchedule?