Additional transforms not working

My nuget package contains:

  • Web.config
    – Web.BLSUAT.config

I have a ‘Staging’ environment and ‘UAT’ environment. In my deploy nuget package step I have the following checked: XML transformation and Additional transforms set to #{TransformFile}. In my variables I have defined the following two variables:

  • Name: TransformFile, Value: Web.BLSStaging.config, Environment: Staging, Machine: (empty), Step: (empty)
  • Name: TransformFile, Value: Web.BLSUAT.config, Environment: UAT, Machine: (empty), Step: (empty)

The additional transforms are not being executed. Where am i going wrong?

If you rename your transform files to remove the BLS prefix:

  • web.config
    – web.staging.config
    – web.uat.config

Also delete the project variables which are not required because the convention is that Octopus will automatically look for a transform that matches the environment it is being deployed to.


Is there anyway I can get it to work with the transforms named as they are? My VS config mode is named as such?


Not that I know of, but other options would include:

  • Change your VS solution configurations to match your Octopus environments, i.e. UAT and Staging.
  • Change Octopus environments to match your VS solution configurations, i.e. BLSStaging and BLSUAT


How do the additional transforms work?


Which additional transforms?

It may be worth reviewing the documentation for XML Configuration Files, in particular the ‘Configuration File Transformations’ section.

In the XML configuration section there is the option to specify “Additional transforms”


That is to support transforming files other than web.config files.

For example we have log4net configuration in a separate file with associated transforms:

  • log4net.config
  • log4net.staging.config
  • log4net.uat.config

Octopus will automatically transform these during a deployment.