C# Class WixSharp.MajorUpgrade

Simplifies authoring for major upgrades, including support for preventing downgrades.
ファイルを表示 Open project: Eun/WixSharp

Public Properties

Property Type Description
AllowDowngrades bool?
AllowSameVersionUpgrades bool?
Disallow bool?
DisallowUpgradeErrorMessage string
DowngradeErrorMessage string
IgnoreRemoveFailure bool?
MigrateFeatures bool?
RemoveFeatures string
Schedule UpgradeSchedule?

Public Methods

Method Description
ToXml ( ) : System.Xml.Linq.XContainer[]

Emits WiX XML.

Method Details

ToXml() public method

Emits WiX XML.
public ToXml ( ) : System.Xml.Linq.XContainer[]
return System.Xml.Linq.XContainer[]

Property Details

AllowDowngrades public_oe property

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
return bool?

AllowSameVersionUpgrades public_oe property

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
return bool?

Disallow public_oe property

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
return bool?

DisallowUpgradeErrorMessage public_oe property

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
return string

DowngradeErrorMessage public_oe property

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
return string

IgnoreRemoveFailure public_oe property

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
return bool?

MigrateFeatures public_oe property

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
return bool?

RemoveFeatures public_oe property

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
return string

Schedule public_oe property

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
return UpgradeSchedule?