Visual Studio 2005 Application Settings Oddities

While watching the MSDN Nugget on Application Settings in Visual Studio 2005, I found a couple of things I found weird about the default application settings provider, LocalFileSettingsProvider:

  1. When saving to Application Data\<Application>\<Assembly>\<Version>, the provider ignores the fact that there is already a mechanism called Isolated Storage already built-into the .NET Framework and instead implements it by itself. This feels like the NIH (Not Invented Here) antipattern.
  2. Isolation is by either the tuple (Assembly, User, Version) or the tuple (Assembly, Version), so settings do not survive versioning. Fabrice explains in a comment that this is what the Upgrade method is for. Cool.

These might be true for other providers, but I haven’t checked them out yet. Anyone from Microsoft care to shed some light on these?

Advertisements

3 thoughts on “Visual Studio 2005 Application Settings Oddities

  1. A mechanism is provided to have settings survive versioning. You can use Properties.Settings.Default.Upgrade()to import settings from a previous version.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s