.NET Configuration (app.config/web.config/settings.settings)

后端 未结 13 1294
广开言路
广开言路 2020-11-29 14:41

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 SQL Server which has d

13条回答
  •  误落风尘
    2020-11-29 15:21

    One of the solutions that worked me fine was using a WebDeploymentProject. I had 2/3 different web.config files in my site, and on publish, depending on the selected configuration mode (release/staging/etc...) I would copy over the Web.Release.config and rename it to web.config in the AfterBuild event, and delete the ones I don't need (Web.Staging.config for example).

    
        
        
        
        
        
        
        
      
    

提交回复
热议问题