ApplicationSettingsBase.Upgrade() Not Upgrading User Settings after Recompiling with .NET 4.0

Posted by Mageuzi on Stack Overflow See other posts from Stack Overflow or by Mageuzi
Published on 2010-04-27T14:49:42Z Indexed on 2010/04/27 14:53 UTC
Read the original article Hit count: 919

I have a C# program that is using the standard ApplicationSettingsBase to save its user settings. This was working fine under .NET 3.5. And the provided Upgrade() method would properly "reload" those settings whenever a new version of my program was created.

Recently, I recompiled the program with .NET 4.0. My program's version number also increased. But, when I run this version, Upgrade() doesn't seem to to detect any previous version settings, and does not "reload" them. It starts blank.

As a test, I recompiled yet again, going back to .NET 3.5. And this time, the Upgrade() method started working again.

Is there a way to allow Upgrade() to work when switching frameworks? Is there something else I am missing? Thanks.

© Stack Overflow or respective owner

Related posts about c#

Related posts about applicationsettingsbase