title: .NET Configuration (app.config/web.config/settings.settings)
body: <p>I have a .NET application which has different configuration files for Debug and Release builds. E.g. the debug app.config file points to a development <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server" rel="noreferrer">SQL Server</a> which has debugging enabled and the release target points to the live SQL Server. There are also other settings, some of which are different in debug/release.</p>
  
  <p>I currently use two separate configuration files (debug.app.config and release.app.config).  I have a build event on the project which says if this is a release build then copy release.app.config to app.config, else copy debug.app.config to app.config.</p>
  
  <p>The problem is that the application seems to get its settings from the settings.settings file, so I have to open settings.settings in Visual Studio which then prompts me that the settings have changed so I accept the changes, save settings.settings and have to rebuild to make it use the correct settings.</p>
  
  <p>Is there a better/recommended/preferred method for achieving a similar effect?  Or equally, have I approached this completely wrong and is there a better approach?</p>