G
Guest
Currently, we are storing our application settings in the registry, but we
want them to be stored in config-files. In order to accomplish that I'm using
the .NET 2.0 System.Configuration namespace. A couple of my own configuration
class have already been derived from ConfigurationSection;
ConfigurationProperty attributes have been added to the the properties as
well. This all works very well, but I forsee some problems for the future:
Question1: In release 1 (R1) configuration property 1 (P1) is available. In
release 2 (R2) P1 is not required anymore and gets removed. When R2 tries to
read the config-file it encounters P1 and throws an exception because it
isn't defined anymore. How can I resolve this, without reconfiguring the
application?
Some of assemblies are registered for com-interop and need to be installed
in the GAC. When assemblies are installed in the GAC, the full name
(including version number) needs to be entered in the config-file in the
attribute "/configuration/configSections/section@type".
Question 2: The first release (R1) has version number 1.0.0.0 and the
section defined in the config-file refers to version 1.0.0.0. The next
release (R2) with version number 2.0.0.0 is installed. The config-file stays
unchanged, because the configurations must be kept. When R2 loads the
configuration an exception is thrown with the message that the assembly with
version 1.0.0.0 couldn't be found. How can I upgrade the configuration from
R1 to R2?
Thanks in advance,
Edwin
want them to be stored in config-files. In order to accomplish that I'm using
the .NET 2.0 System.Configuration namespace. A couple of my own configuration
class have already been derived from ConfigurationSection;
ConfigurationProperty attributes have been added to the the properties as
well. This all works very well, but I forsee some problems for the future:
Question1: In release 1 (R1) configuration property 1 (P1) is available. In
release 2 (R2) P1 is not required anymore and gets removed. When R2 tries to
read the config-file it encounters P1 and throws an exception because it
isn't defined anymore. How can I resolve this, without reconfiguring the
application?
Some of assemblies are registered for com-interop and need to be installed
in the GAC. When assemblies are installed in the GAC, the full name
(including version number) needs to be entered in the config-file in the
attribute "/configuration/configSections/section@type".
Question 2: The first release (R1) has version number 1.0.0.0 and the
section defined in the config-file refers to version 1.0.0.0. The next
release (R2) with version number 2.0.0.0 is installed. The config-file stays
unchanged, because the configurations must be kept. When R2 loads the
configuration an exception is thrown with the message that the assembly with
version 1.0.0.0 couldn't be found. How can I upgrade the configuration from
R1 to R2?
Thanks in advance,
Edwin