Environment Overrides' settings disappear after reopening App.config

Topics: General discussion
Mar 16, 2007 at 10:00 PM
Hello, I find the following behavior some weird:

First I:
- Open the app.config file with the Enlib's Configuration Editor.
- Add an entry in the AppSettings section.
- Add a new Environment in the Environments section
- Change my app setting's entry to override its value in the new environment.
- Save and close the app.config file.

Then, when I reopen the app.config file with Enlib's Configuration Editor I found that:
- The environment I created before was no more under the Environments’ tree node.
- I get the environment back through the "Open Environment Delta" item in the Environments context menu.
- I go to my AppSettings entry's properties, and see the "Don't Override Properties" option in the "Override in MyEnvironment" property, instead of the value I selected before.

Is this the expected behavior??


Mar 17, 2007 at 12:44 AM
Hi Sole -

We made a deliberate decision not to associate the master config file with the delta files, since often the different deltas will be stored in different environments. A side-effect of this is that deltas will not automatically open with the master file.

The other issue looks like a bug. We couldn't repro in our latest builds, so it looks like we've already fixed it.

Mar 17, 2007 at 3:39 PM
I think the environments not showing up automatically when you re-open a configuration file is going to surprise a lot of people as the behavior is not consistent with other features in the GUI Tool.

I do understand the logic behind the decision, but I think there is a middle ground that I mentioned here:


that can provide the expected behavior as well as flexibility.




David Hayden
Microsoft MVP C#
Jun 27, 2007 at 10:33 PM
Edited Jun 27, 2007 at 10:34 PM
Has this been revisited? I'd really like to advise my customer on how to edit their delta configs. In essence, there really is no point in in using the Config Editor tool for override settings since there appears to be no way to use it after the initial creation of the delta files. I'm not crazy about the idea, but I'm thinking I should just set their expectations that editing the dconfig XML is the way to go.
Jun 28, 2007 at 2:06 PM
There might be a misunderstanding. You can use the overrides after the initial creation by loading the delta file (right-click on "Environments", choose "Open environment delta"); the tool will just not load them by default as there is no link betwen the main file and the delta file.