I want to use
<compilation … xdt:Transform=“SetAttributes” xdt:Transform=“RemoveAttributes(debug)”/>
When I want to deploy, I get a message, explaining that we can’t use twice xdt:Transform on the same code : “xdt:Transform is a duplicate attribute name.”
So, I try to put the 2 attributes in a single “xdt:Transform”, using multiple ways :
xdt:Transform=“SetAttributes, RemoveAttributes(debug)”
xdt:Transform=“SetAttributes(RemoveAttributes(debug))”
I get this error :
Microsoft.Web.XmlTransform.XmlNodeException: Transform and Locator attributes must contain only a type name, or a type name followed by a list of attributes in parentheses.
The error message you are seeing isn’t coming from Octopus Deploy and is instead coming from the Microsoft utility which parses these transformations. You’ll need to refer to their documentation for the correct way to do this.
I believe you may be able to use something similar to the following approach: