We use configuration transforms to point the web.config to the correct environmentsettings file. The issue we run into is that when we promote to an environment that environment’s environmentsettings file is skipped for the find and update variables step.
For example when we publish to preview the file environmentsettings.preview.config is skipped but all the other files are processed. A publish to prod then causes environmentsettings.prod.config to be skipped. This was working with Octopus 1.x . We just noticed the variables substitution not being made when we upgraded to 2.3
Thanks for reporting this. It seems quite strange that Octopus would look inside of all the files except the one named after the environment. Is it possible that you also have an “environmentsettings.config” file and that Octopus thinks “environmentsettings.preview.config” is a transformation file, and then deletes it?
Would it be possible to attach a full deployment log?
Paul thanks for pointing me in the right direction. Just in case anyone runs into the same problem I found two solutions.
Set the build action for environmentsettings.config in Visual Studio to none. This way the file won’t be included when pushed through Octopus and then the environment specify files won’t be treated as web transforms.
Rename the files to environmentsettings-dev.config, environmentsettings-test.config, environmentsettings-preview.config, and environmentsettings-prod.config so Octopus doesn’t treat them as transformation files.