How to remove a ConnectionString using Config Transformations

前端 未结 2 890
一生所求
一生所求 2020-12-15 02:42

I have a Web.config with several ConnectionStrings


    

        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-15 02:47

    From the MSDN documentation on the subject:

    
      
        
      
    
    

    The Transform="Remove" is the magic you're looking for. There is also a Transform="RemoveAll" which you might be able to use in conjunction with a specific add(s).

    EDIT

    On second thought you may also be able to combine the Locator attribute with the Remove defined above to limit which elements you actually want to delete.

    More definitively:

    
      
        
      
    
    

    Or similar should work.

提交回复
热议问题