How to perform Configuration Transformation

I want to replace the Web.config based on the environment. I have created many config files like Web.PRD.Config, Web.UAT.config etc

Now i want to replace the web.config with the relevant environment config file and then replace some of AppSettings and connection values from the Variables.

Please help how i can achieve this.
I searched over google but i could not get more help with some examples.


Thanks for getting in touch! You can certainly perform config transformations based on the environment you’re deploying to. If your Web.PRD.config and Web.UAT.config files include XML transformation syntax (i.e. xdt:Transform) and define the transforms in your package step by turning on the Configuration transforms feature in the step.

By default, Octopus will find and transform web.config files based on the convention *.<EnvironmentName>.config, meaning if your environment names as defined in Octopus match exactly as shown in your config files (PRD and UAT), they’ll automatically be used on deployment to their respective environment. If you don’t follow this convention, you can define additional transforms in this feature using the syntax Web.PRD.config => web.config. You can refer to our documentation for more info on this feature along with some other options.

I hope this helps get you going! Don’t hesitate to reach out if you have any further questions going forward. :slight_smile:

Kind regards,


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