Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

ApplicationSettings Upgrade doesn't work with local settings?

$
0
0

We're using ApplicationSettings (.NET 4) to store user configuration (using the settings designer).  We have tagged settings as local or roaming as appropriate, so we have user.config files in both the Local and Roaming directories.

The problem is that, when I try to migrate settings during a version upgrade, the Local settings are not retrievable.  Both .Upgrade() and .GetPreviousVersion(string) fail to obtain any settings that aren't roaming settings.

Using .NET Reflector, I can see why this is occurring.  It looks like the ConfigurationUserLevel that's passed to GetExeConfig is ConfigurationLevel.PerUserRoaming and not ConfigurationLevel.PerUserRoamingAndLocal.

How am I supposed to migrate all of the settings from the old version?  Am I missing something?

Thanks!


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>