title: Environment setting in a .net applilcation
body: <p>I need to know how we can control the environment setting in the application without manually changing the setting in app.config in my .net windows application.  In Java I would use a command line option (-D parameter) to set the environment when the app launches, example: java -D environment=1 myProgram.  Can I use .net SDKs msbuild here?
  Please let me know if any of these solutions will be applicable in my case:</p>
  
  <p><a href="http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx" rel="nofollow noreferrer">http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx</a></p>
  
  <p><a href="http://wallism.wordpress.com/2009/12/21/msbuild-and-multiple-environments/" rel="nofollow noreferrer">http://wallism.wordpress.com/2009/12/21/msbuild-and-multiple-environments/</a></p>
  
  <p><a href="http://www.c-sharpcorner.com/UploadFile/mgold/MSBuildForXml07282006005222AM/MSBuildForXml.aspx" rel="nofollow noreferrer">http://www.c-sharpcorner.com/UploadFile/mgold/MSBuildForXml07282006005222AM/MSBuildForXml.aspx</a></p>
  
  <p><a href="https://stackoverflow.com/questions/3137872/msbuild-configuration-files">MSBuild Configuration Files</a></p>
  
  <p><a href="http://www.timvw.be/2008/03/17/easily-switching-between-appconfig-files-with-msbuild/" rel="nofollow noreferrer">http://www.timvw.be/2008/03/17/easily-switching-between-appconfig-files-with-msbuild/</a></p>
  
  <p>Thanks.</p>