I’m working on a huge C# codebase (~300 KLOC). The components of the system use config files scattered across the folder hierarchy. Values that are read from config in one place are stored in a constant in another. There are several copies of the same config in different folders, copied and checked in once, and then never updated. Some files have 3 different versions, one for the developer machine, one for staging and another one for the live system. I have to clean up this horrible mess. How should I start? What is an intelligent strategy to deal with duplicated values in different files, multiple copies of the same file and multiple versions for different build environments? How can I store everything in one place without creating a “dependency magnet”?
Share
The answer to your prayers is ConfigGen. Check it out on CodePlex: ConfigGen
It does exactly what you are asking for.
Update:
Look at my examples of usage here: How to select different app.config for several build configurations