title: How can I use several Application Configuration Files in one project?
body: <p>After creating new Visual C# Console Application (.NET Framework 4.5), such project contains default App.config file. </p>
  
  <p><img src="https://i.stack.imgur.com/yIwQI.png" alt="New Visual C# Console Application"></p>
  
  <p>After adding a reference for System.Configuration to project and use it in some source file <code>using System.Configuration;</code> I can use static class <code>ConfigurationManager</code> to operate with App.config file. But before, I want to add some settings to the file, so it's somehow like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;appSettings&gt;
      &lt;add key="DeployWeb" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;startup&gt; 
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Now, I can write something like this, to get the value of the setting:</p>
  
  <pre><code>Boolean deployWeb = false;
  Boolean.TryParse(ConfigurationManager.AppSettings["DeployWeb"], out deployWeb);
  </code></pre>
  
  <p>However I didn't set which configuration file to read,but it's okay, because there is the default one. But I can add more configuration files by right click on the project -> Add -> New Item... -> Application Configuration File, so that I have, for example, 5 configuration files, like on the picture:</p>
  
  <p><img src="https://i.stack.imgur.com/AGOWz.png" alt="Several configuration files in a project"></p>
  
  <p>And <code>ConfigurationManager</code> will still read the default one, but I want to manually control, which config file to use. I want to know, if is there an appropriate way to set to the  <code>ConfigurationManager</code> config file name to use etc. and if it's not a bad practice. I know how to use different configurations in debug/release mode, but in my case I have an application, that can be runned in different modes for different purposes in release, for example.</p>
  
  <p><strong>Question</strong>: Is it possible to have several configuration files in a project and to have ability to switch which one I want to use. Isn't it a bad practice, shall I use some another approach for my purpose ? Using build events is not suitable in my case (I think).</p>
  
  <p><strong>PS.</strong> I am sorry for stretching my question, however my itis quite simple and could be just asked in two sentences, but as the <a href="https://stackoverflow.com/help/how-to-ask">rules</a> says, question should contains details.</p>
  
  <p><strong>UPDATE</strong>:
  From already <a href="https://stackoverflow.com/questions/4454016/multiple-app-config-files-in-net-class-library-project">existing answer</a> "Option: You can use the ConfigurationManager Class to load an alternate config file by code." From reading <a href="http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager(v=vs.110).aspx" rel="noreferrer">msdn</a> I didn't get which of the methods should I use. Should I open Exe configuration ?</p>