We run a complex system written in C#.NET 3.5, consisting of 20+ websites, 10+ windows services and various scheduled tasks and helper apps.
Each of these is bundled with one or more of our framework and business logic DLL's. These DLL's have extensive config settings, and this has turned into a nightmare where we're maintaining over 40 config files for multiple instances of the same class libraries.
We don't register our DLL's in the GAC for various reasons: 1) We like the flexibility of quickly rolling out changes to selective projects without rebuilding the whole system or causing unnecessary downtime. 2) Some instances of the DLL's require slightly different configs; for example some projects use different connection strings, notification e-mail addresses and so on.
We experimented with the AppSettings file/configSource attributes in Web.config/App.config, but those only work with relative paths, not across projects. We considered saving the defaults in machine.config but this is a mission, being too cluttered and full of important stuff unrelated to our projects.
Our current "solution" is to use our own config file format, which first checks for a config in the current project's "bin" folder, and if that doesn't exist it loads from a hard-coded central location. This allows us to override settings when necessary but use the default settings the rest of the time.
Ultimately what we want is to have each class library default settings in a central location, and then each instance could have an optional config file which only overrides those settings that differ from the default.
Is there a suggested, industry-standard way of solving this problem in .NET ?