IApplicationSettingsProvider.Upgrade(SettingsContext, SettingsPropertyCollection) IApplicationSettingsProvider.Upgrade(SettingsContext, SettingsPropertyCollection) IApplicationSettingsProvider.Upgrade(SettingsContext, SettingsPropertyCollection) IApplicationSettingsProvider.Upgrade(SettingsContext, SettingsPropertyCollection) Method

Definition

Indicates to the provider that the application has been upgraded. This offers the provider an opportunity to upgrade its stored settings as appropriate.

public:
 void Upgrade(System::Configuration::SettingsContext ^ context, System::Configuration::SettingsPropertyCollection ^ properties);
public void Upgrade (System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties);
abstract member Upgrade : System.Configuration.SettingsContext * System.Configuration.SettingsPropertyCollection -> unit
Public Sub Upgrade (context As SettingsContext, properties As SettingsPropertyCollection)

Parameters

context
SettingsContext SettingsContext SettingsContext SettingsContext

A SettingsContext describing the current application usage.

properties
SettingsPropertyCollection SettingsPropertyCollection SettingsPropertyCollection SettingsPropertyCollection

A SettingsPropertyCollection containing the settings property group whose values are to be retrieved.

Remarks

The .NET Framework enables side-by-side installation and execution of different versions of the same application. The application settings provider stores the application settings for each version of an application separately to ensure isolation. However, you may want to migrate settings from the previous version of an application to the current one. To provide this migration functionality, use the Upgrade method, implemented in a class derived from SettingsProvider.

You can use the Upgrade method in conjunction with the GetPreviousVersion method to migrate application settings during or after the installation of a new version of an application.

This method should be suppressed for every application setting that has the NoSettingsVersionUpgradeAttribute is applied to it, or to the entire settings wrapper class, derived from ApplicationSettingsBase.

Security

SecurityException
For LinkDemand permission.

Applies to

See also