web.config transform - delete comments from connectionstring section

后端 未结 4 2176

I store several different connection strings in my web.config for development and testing. All but one is commented out so I can change info as needed.

When I publish, I

4条回答
  •  北荒
    北荒 (楼主)
    2021-02-12 10:40

    Instead of transforming the string, or using "Remove" and "Insert" clean the section try using "Replace".

    For example:

    
    
        
    
    
    

    You can configure this section exactly how you want it, even if that means you add new comments.

提交回复
热议问题