Additional transformations using environment and machine not applying

I was using version 1.6 and had some web.config transformations based on machine eg web.demo.config where demo is the machine name. These were working correctly. I then added additional environments so I now want to have and web.uat.demo.config applied based on both the environment and the machine.

I’ve set the additional transformations in the process to “web.#{Octopus.Environment.Name}.#{Octopus.Machine.Name}.config” and tried numerous variants of that but the transformation is not be applied. I updated to version but that did not change anything either. Is there something I’m missing or is this not supported?


Hi Chris,

Thanks for reaching out. Could you please share us some info to be able to help you out properly?

  • Screenshot of how the files are organized inside your nuget package.
  • Screenshot of your current transform config.



Hi Dalmiro,

I’ve attached some screenshots showing the transforms, some of the content of one, and the Octopus configuration for the additional transforms.


Can anyone shed light on this?

Hi Chris,

Really sorry about the delay in the response here. The syntax you are using is incorrect. You need to define the file the transform will, well transform.
Such as: web.#{Octopus.Environment.Name}.#{Octopus.Machine.Name}.config => web.config as the full line in the additional transforms field.

If you click on the ? icon at the top right it will show you syntax and helpers.

Hope that helps.

Thanks Vanessa. I missed that change in the upgrade. Also didn’t notice the ? icon, that’s helpful.

Hi Chris,

Yeah you might come across a few differences like that. The ? will hopefully help, and you also might find some issues with variables changing, and a few breaking changes. But I guess it’s all a bit new.
Using this page: and selecting the highest patch version of each minor version will give you a quick idea of what breaking changes were added as a small heads up.


Is it possible to use project variables in the additional transforms? I have been trying to use Web.#{CurrentEnvironment}.config => Web.Config but it doesn’t seem to be doing the transform. I would like to get away from having to use something like QA_STG as the Octopus.Environment.Name just so it will match the config name (web.QA_STG.config).

Hi Matt,

Yeah you can use variables in this way. My first guesses as why it isn’t working:

  1. scope on the variable isn’t set for the environment being deployed to
  2. the variable was created after the release you used, so it is not in the snapshot, you might need to create a new release
  3. the transform file is not in the same directory as the config file

Barring it not being any of that, could you show me some screenshots of your variable, step settings and a deployment log?


I verified that it wasn’t one of the three you listed. I’ve attached screenshots of the different settings in question.

  1. NuGet Package - The screenshot shows that the BR4 configs are there.
  2. Project Variables - CurrentEnvironment is the variable I setup so that the we wouldn’t have to create duplicate environments just for BR4.
  3. Step Settings - I did find that I was able to get around the issue of not being able to use CurrentEnvironment by doing this… “Web.#{Octopus.Environment.Name}_BR4.config => Web.Config”. In the screenshot you can see that I used both but the only one that works is the one that uses the #{Octopus.Environment.Name} and doesn’t seem to like the #{CurrentEnvironment} that I setup. Could it be that the Project Variables aren’t substituted before the transform happens?



Hi Matt,

One last thing please. Can you turn on variable debugging for the project and create a new release and deploy it for me, and then send through the full logs. It will show of the variable is available or not.