title: How to change location of app.config
body: <p>I want to change the location where my application looks for the app.config file.  </p>
  
  <p>I know that I can use ConfigurationManager.OpenExeConfiguration() to access an arbitrary config file - however, when the .Net Framework reads the config file (for ConnectionStrings or EventSources, for instance), it will look at the default location.  I want to actually change the location, globally for the entire .Net Framework (for my application, of course).</p>
  
  <p>I also know that I can use AppDomainSetup to change the location of the app.config for a new AppDomain.  However, that doesn't apply to the primary AppDomain of the application.</p>
  
  <p>I also know that I can override function Main() and create a new AppDomain as above and run my application in that new AppDomain.  However, that has other side-effects - for instance, Assembly.GetEntryAssembly() will return a null reference.</p>
  
  <p>Given how everything else works in .Net, I would expect there to be some way to configure the startup environment of my application - via a Application Manifest, or some such - but I have been unable to find even a glimmer of hope in that direction.</p>
  
  <p>Any pointer would be helpful.</p>
  
  <p>David Mullin</p>