title: Duplicate keys under app.config
body: <p>I have a project where I maintain separate app.config files for connection strings for each environment, for example, a Dev.config for the dev env, QA.config for QA, etc. I have a master app.config file where I just key in the env as "Dev" or "QA" and the env specific connection strings are activated as shown below.</p>
  
  <p>Dev.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;connectionStrings&gt;
     &lt;add name="connection1" connectionString="&lt;dev_string&gt;" /&gt;
     &lt;add name="connection2" connectionString="&lt;dev_string&gt;"/&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>QA.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;connectionStrings&gt;
     &lt;add name="connection1" connectionString="&lt;qa_string&gt;" /&gt;
     &lt;add name="connection2" connectionString="&lt;qa_string&gt;"/&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>App.config</p>
  
  <pre><code>&lt;connectionStrings configSource="ConnectionStrings\Dev.config"&gt;
  &lt;/connectionStrings&gt; 
  </code></pre>
  
  <p>But, now I have a reqmt. where cross-environment functionality is to be implemented. What is the best approach to go about this? I could add each of the connection strings in the master app.config by giving it an env specific name, but I feel this might not be the best approach. </p>
  
  <p>So, is there a way to still keep the env specific config files and load all the connection strings across all environments in the master app.config under different namespaces or something to avoid key duplication errors?</p>
  
  <p>Thanks in advance for all the help...</p>