I have a WebApp on Azure that I’ve managed to get published out with Octopus working with.
However I’m struggling to get the config transformations packaged in the release to run. For example I have one called Web.Development.config that I want to be run on a particular environment.
But the config transforms are never run, and it doesn’t look like they are searched for either.
I’m running 3.0.0.1930 and deploying directly to an Azure Web App.
For reference, I have tried to tick the “Automatically run configuration transformation files” but it wont stay ticked…
Hi Luke, thanks for getting in touch.
There were some issues with the config transforms checkbox in 3.0.0 (which was a pre-release build) - can you upgrade to the latest stable version (3.0.3 I believe) and try it again?
Paul
Hey,
We’ve updated and I still don’t have the config being transformed. It’s not very clear as to what the rules are for when transforms are run?
I’ve managed to get it working. I’ve simplified down my environment names which is where I was getting confused.
i.e. If I have an environment called “Development (User X)” what will it expect the config name to be?
Hi Luke,
I have had a play with different environment names, it seems to me that if the environment name has a space in it the config transform won’t be applied. I’ve created an issue to fix this: https://github.com/OctopusDeploy/Issues/issues/1757.
Thanks for bringing it to our attention.
Cheers,
Shane
Hi Luke,
It turns out the issues with spaces was because I was adding files to the NuGet package with zip instead of creating a package with nuget.exe. NuGet encodes spaces differently to a zip file so they will not be shown in the package.
So, your transformations to “Development (User X)” should be working. I have your exact transforms working by including the file Web.Environment (User X).config
in the package.
Cheers,
Shane