.NET different application settings for development and release

前端 未结 7 1061
慢半拍i
慢半拍i 2021-01-18 04:06

I am using VS2010 C#.NET 3.5 and application settings (the Settings.settings file). What I want to do is have different settings for my development and production environmen

相关标签:
7条回答
  • 2021-01-18 04:54

    Assuming you mean the values of the settings, I think the best way to do this is to put all the production environment values in a comment in the settings file. Or only set them when deploying the application.

    There's no real built-in mechanism for this in .Net if that's what you're after.

    At my current job we have a little command-line tool which will set all the values right for a given environment. The configuration is done in a database.

    At my previous job we never copied the config file to the deployment directory, but rather changed the files manually if needed.

    0 讨论(0)
提交回复
热议问题