Thu, Aug 11 2005 9:39 PM
Managing enterprise library configuration over multiple environments
As promised in an earlier post I would have a look into a way to manage configuration from within the EntLib Configuration Console over multiple environments. Just recently I had to deal with this very same problem on the project I worked at and found a solution I think works pretty decently. The solution is implemented as an ‘application block’ and uses my very favorite PropertyGrid to throw some extra Extenders and TypeDescriptors at the configuration nodes in the console.
The ‘application block’ can be added to any project within the configuration console. To declare a new environment (places where you might want to have alternative configuration), you simply add a configuration node to the “Environment overrides”.
All configuration nodes are then extended with new properties for that apply on that specific environment. Properties are automatically kept in sync with the enterprise library property when the ‘Override on Xxxx environment’ property is left as “Don’t override properties” .
After saving your configuration to disk a subdirectory will be created for each environment, containing a complete configuration setup for that specific environment. Commonly a buildserver should be responsible for distributing the configuration files from the subdirectories to the different physical environments.
The application block is only tested with the June version of EntLib and not tested with any custom application blocks. Please backup your configuration, as I would hate to see anyone losing their work because of flaws in the plugin.
The plugin can be deployed by recompiling the sources against your EntLib binaries and then copying the “EnvironmentalOverrides.dll” to EntLib’s bin directory.
The source of this EntLib plugin can be found here.