title: How do you manage .NET app.config files for large applications?
body: <p>Suppose a large composite application built on several foundation components packaged in their own assemblies:  (database reading, protocol handlers, etc.).  For some deployments, this can include over 20 assemblies.  Each of these assemblies has settings or configuration information.  Our team tends to like the VS settings editor (and the easy-to-use code it generates!), and the application vs. user distinction meets most of our needs.</p>
  
  <p>BUT....</p>
  
  <p>It is very tedious to copy &amp; paste the many configuration sections into our application's .xml.    Furthermore, for shared components that tend to have similar configurations across applications, this means we need to maintain duplicate settings in multiple .config files.</p>
  
  <p>Microsoft's EntLib solves this problem with an external tool to generate the monster .config file, but this feels klunky as well.</p>
  
  <p>What techniques do you use to manage large .NET .config files with sections from multiple shared assemblies?  Some kind of include mechanism?  Custom configuration readers?</p>
  
  <p>FOLLOWUP:</p>
  
  <p>Will's <a href="https://stackoverflow.com/questions/89245/how-do-you-manage-net-appconfig-files-for-large-applications#89618">answer</a> was exactly what I was getting at, and looks elegant for flat key/value pair sections.  Is there a way to combine this approach with <a href="https://stackoverflow.com/questions/89245/how-do-you-manage-net-appconfig-files-for-large-applications#89618">custom configuration sections</a> ?  </p>
  
  <p>Thanks also for the suggestions about managing different .configs for different build targets.  That's also quite useful.</p>
  
  <p>Dave  </p>