How to use multiple attributes on xdt:Transform?

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)”
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.

How can I resolve it ?
Thanks for your help,



Thank you for reaching out to us with your query.

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:


I hope this is helpful. Please let me know if you have any questions.

Best Regards,