Transforming files with msdeploy

前端 未结 4 1198
不思量自难忘°
不思量自难忘° 2020-12-15 14:06

Can I use the config transforms mechanism of MSDeploy to transform other files?

4条回答
  •  天命终不由人
    2020-12-15 15:10

    Just to add to this awnser, in order to modify other files than the web.config in an application published with msdeploy (webdeploy) you can set the scope attribute in the parameters.xml file in the root of the project:

    
      
        
        
      
    
    

    scope is a regex that will be used to find files to apply the match xpath to. I havent experimented with this extensively but as far as I understand it simply replaces what ever the xpath matches with the value that is provided later.

    There are also other values that can be used for kind that will have different behaviors than an xpath, see https://technet.microsoft.com/en-us/library/dd569084(v=ws.10).aspx for details

    note: this applies to when you're using a parameters.xml, not when using the web.config.Debug/Release files

提交回复
热议问题