My application has a custom configuration section in app.config as shown below:
I'm loading and referencing the section like this:
|
I have the config bound to various fields on a config form. Which all works fine.
I save the config like this:
|
This all works fine and persists the config accross application sessions.
However, the configuration is lost on each publish of a new version of the application using ClickOnce deployments.
I've google and read numerous articles on persisting settings accross updates and all seem to reference "settings" which isn't really what I'm using. Maybe I should be.
Any help would be greatly appreciated!!
KeithPosted Sep 6, 2010, 4:13 AM
if (Properties.Settings.Default.UpgradeSettings)
{
Properties.Settings.Default.Upgrade();
Properties.Settings.Default.UpgradeSettings = false;
}
Thing is I believe this handles the setttings but not custom configuration sections?
Dipal ChoksiPosted Sep 5, 2010, 7:49 PM
http://msdn.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.upgrade.aspx
It is supposed to preserve (merge) the existing settings on upgrade.