Home All Groups Group Topic Archive Search About

Settings independent of assembly version

Author
26 Apr 2006 6:04 PM
Jarod
Hello,

is there a way to save settings independent of the assembly version?
..NET always stores the file user.config below a directory that has the
name of the assembly version. When the version of an application
changes, the file is written to a new directory and read from there.
With this behaviour a new version of an application cannot apply
settings that were saved with an older version of that application! Is
there a solution to have this version independent?


Jarod

Author
28 Apr 2006 1:44 PM
Carl Daniel [VC++ MVP]
Jarod wrote:
> Hello,
>
> is there a way to save settings independent of the assembly version?
> .NET always stores the file user.config below a directory that has the
> name of the assembly version. When the version of an application
> changes, the file is written to a new directory and read from there.
> With this behaviour a new version of an application cannot apply
> settings that were saved with an older version of that application! Is
> there a solution to have this version independent?

AFIAK there's no straightforward way to do it within the built-in settings
machinery.  You'd have to make your installer hunt for the file in the "old"
place and update it (as needed), saving a copy to the "new" place.

-cd
Author
29 Apr 2006 3:19 PM
Jarod
But I think during development of an application this is not very nice
as with every build, the version number is increased and a lot of
folders and settings files are created over the time.


Jraod
Author
29 Apr 2006 5:21 PM
Carl Daniel [VC++ MVP]
Jarod wrote:
> But I think during development of an application this is not very nice
> as with every build, the version number is increased and a lot of
> folders and settings files are created over the time.

If you're unhappy with it, I'd suggest submitting (or finding and voting on)
a suggestion to change it at

http://lab.msdn.microsoft.com/productfeedback

I agree - it's pretty lame the way it is.  Very easy to use, but rife with
problems for real-world applications.

-cd

AddThis Social Bookmark Button