My application has a custom configuration section in app.config as shown below:
I'm loading and referencing the section like this:
Java |
I have the config bound to various fields on a config form. Which all works fine.
I save the config like this:
Code |
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!!

Dipal ChoksiRank #199 · 12K reputationPosted Sep 5, 2010, 3:49 PM EDT
http://msdn.microsoft.com/en-us/library/system.configuration.applicationsettingsbase.upgrade.aspx
It is supposed to preserve (merge) the existing settings on upgrade.
Keith6 reputationPosted Sep 6, 2010, 12:13 AM EDT
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?