XML Transform Error On Failed xdt:Locator

I get different results for the same transform in Octopus than outside of Octopus.

For example, if I use this website to test a transform (https://webconfigtransformationtester.apphb.com/) I can successfully transform xml using a xdt:Locator that ‘fails’ to find a match.

In my xml for example I may or may not have a particular element…but if I do, I want to SetAttributes on it.

When I put that same successful transform into Octopus the deployment fails, with an error like this:

File [deleted for brevity]xxx.Deploy.xml, line 4, position 6:

April 18th 2019 16:26:34


No element in the source document matches ‘/_defaultNamespace:xxx/_defaultNamespace:yyy/_defaultNamespace:zzz[@ref=‘AddressSearchService’ and @implementationName=‘nnn’]’

Why does Octopus error on a non Locator match - and is there a way to achieve this in Octopus?

Hi @swells,

Thanks for getting in touch. We’ve seen some weird errors/scenarios with config transforms but I think you can address this problem by ignore config transform errors. If you add a variable named Octopus.Action.Package.IgnoreConfigTransformationErrors with the value true to your Octopus project, it will ignore errors like this. This enables teams to customize their transforms as required.

You can read more about this in our docs

Hope this helps!



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