One of the more frequent questions I have heard about Enterprise Library is how to efficiently manage configuration information across multiple environments (eg DEV, TEST, PROD etc). The problem is that most configuration settings are shared across all environments, but certain key settings, such as server names or connection strings, can be different. The standard solutions are to either maintain completely separate configuration file sets for each environment (which can lead to inconsistencies where a change isn’t made consistently across all environment files), or to keep a single configuration file set and make the necessary changes for each environment when an application is deployed (which is inefficient and error-prone).
We are planning to have a better solution to this problem in Enterprise Library for .NET 2.0. But in the meantime, Olaf Conijn has put together a simple and elegant solution that solves this problem today with Enterprise Library June 2005. His solution is a new application block which can extend the configuration of any existing blocks by letting you specify environment-specific overrides on a per-node basis. It then saves a complete set of application configuration files while maintaining a single source across all environments. The coolest thing is, he achieved this without needing to change any existing Enterprise Library code! (Also check out this other post about some scenarios where this can be used).
If you have had challenges maintaining configuration across environments, I strongly recommend you take a look at this. And we’ll definitely be talking more to Olaf as we continue development on the next version. Thanks Olaf!