Exclude .config files from appSetting and connectionString replacement


Is it possible to exclude files from being included in the appSetting / connectionString .config file replacement as part of the “Configuration Variables” feature?

We are using a Quartz library that has a .config file for configuration that has a non-XML structure. Octopus is attempting to replace variables in this file and throwing an exception as it is not XML:

Exception while replacing configuration-variables in: ********\quartz.config
System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.

I have tried to supress errors via “Octopus.Action.Package.IgnoreConfigTransformationErrors” but that seems to only suppress transform errors rather than file parsing errors.


Thanks for reaching out. Yeah that variable will only suppress errors that happened while the Config Transfom feature was running. The variable you should be using is Octopus.Action.Package.IgnoreVariableReplacementErrors set to True.

Hope that helps,

I will give this a try today, thank you!

Thank you, that works great and allows my deployment to succeed.

It would be good if “Octopus.Action.Package.IgnoreVariableReplacementErrors” was an enum with options like:


Thus the deployment wouldnt be marked with a green tick and a warning triangle on the dashboard because I was expecting it to warn me.


This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.