Additional Transforms for web.config

If I’m using this:
web.#{Octopus.Environment.Name}.config.transform => Web.Config

Does the package require the Web.config file or can Octopus use the existing Web.config file in the “Install to” property?

I have multiple steps that deploy to the same install to directory where each step requires transforms to be done to the same file. In this case the Web.config file. I’m not currently including the Web.config in my packages because the transforms need to be additive.

|- Project 1
|- Project 2
|- Project 3

I’m deploying each project as a step. None of the NuGet packages contain the Web.config as I want to use the file on the destination tentacle.

I’m working on writing a Powershell script to do these transforms after all packages are deployed but I’m hoping it’s not necessary.

Any thoughts / suggestions would be helpful.


Hi Jeff,

Thanks for getting in touch! Whilst I have not tested this, it should work but the PowerShell option would be the only way to do so. Octopus can only transform the web.config if it is inside the package. The following link has the ordering of how Octopus deploys, including the transformations. It may help your process to know the ordering of things here.

I have seen a couple of instances of people trying this but not heard any results, so I can not point out anything to keep in mind. I would be interested to hear how you go here.

Let me know.

Best regards,