.NET different application settings for development and release

前端 未结 7 1308
慢半拍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:38

    Or you can just create separate config files and call them:

    Release.settings

    Debug.settings

    then setup conditional build events that copy the appropriate .config file to Settings.Settings

    
    if $(ConfigurationName) == Debug xcopy debug.settings settings.settings
    if $(ConfigurationName) == Release xcopy release.settings settings.settings
    

提交回复
热议问题