开发者

Environment setting in a .net applilcation

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:

http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx

http://wallism.wordpress.co开发者_StackOverflow社区m/2009/12/21/msbuild-and-multiple-environments/

http://www.c-sharpcorner.com/UploadFile/mgold/MSBuildForXml07282006005222AM/MSBuildForXml.aspx

MSBuild Configuration Files

http://www.timvw.be/2008/03/17/easily-switching-between-appconfig-files-with-msbuild/

Thanks.


You can find them in then System.Environment class

http://msdn.microsoft.com/en-us/library/system.environment.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜