Config Transform in Octopus deployment not working correctly


Deploy to Azure Web App
Octopus version: 2018.8.4

Need to figure out why Config Transform in Octopus deployment not working correctly, The result don’t contain the “/” in the end of the url.

Here is the web.config: (Some how, in this post, if line start with “<”, it not shown at all :slight_smile: )
add key=“WebApiUrlRoot” value=“” />
add key=“WebApiUrlRoot” value=“” xdt:Transform=“SetAttributes” xdt:Locator=“Match(key)” />

add key=“WebApiUrlRoot” value=“” /> # No “/” in the end of the url

Octopus Log:

Transforming ‘C:\Octopus\Work\20181010121033-11660-9953\staging\Web.config’ using ‘C:\Octopus\Work\20181010121033-11660-9953\staging\Web.Dev.config’.
Warning will be elevated to errors. Prevent this by adding the variable Octopus.Action.Package.TreatConfigTransformationWarningsAsErrors and setting it to false.
Executing SetAttributes (transform line 18, 75)
on /configuration/appSettings/add[@key=‘WebApiUrlRoot’]
Applying to ‘add’ element (source line 8, 6)
Set ‘key’ attribute
Set ‘value’ attribute
Set 2 attributes
Done executing SetAttributes

Solve it:
Duplicate Variable int Variable transform


Hi Ofer,

Thanks for getting in touch! That’s great to hear you’ve found the solution - thanks for letting us know. Don’t hesitate to reach out if you have any other questions or concerns in the future. :slight_smile:

Best regards,


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.