Configuration variables replace on different *.config files

We have 'a configuration files not app.config or web.config but, we currently use castle framework configuration’s.

  • In version repository we hold configuration with default values.
  • We can deliver this package directly (on-premises)
  • We upload this package also in Octopus

So i need to is replace configuration with “Configuration Variables” process step. But the our *.config file stands with different xml format. I copied below.
I couldn’t found any documentation for “custom expressions”, can you refer any document or help about this ?


Our config format…

<?xml version="1.0" encoding="utf-8" ?> net.tcp:// net.tcp:// net.tcp:// False 60


Thanks for reaching out! Just to make sure i got this right: Your configuration files are files with a .config extension that contain XML similar to your example, and you want to modify values inside of it on the fly during your deployment.

Is that correct? I wanna make sure i understand your scenario to give you a proper answer.



Hi Dalmiro,

Yes thats correct, i want to replace them during deployment like octopus replacing appsettings.


In this case you can use the feature “Substitute Variables in files”. This will help you substituting values on any kind of files

The example on the post uses a JSON file, but the same can be applied for your .config file

Hope that helps!