.Config file transformations with visual studio environment names that don't match OD environment names

I’m working on leveraging OD to start deploying new apps. We use .config transformations for our service, using definitions used from before OD was an option. The config transformations are named Debug, Release, and TestUAT.

We have created three environments specifically for use by this app. They are named App - Dev, App - Test, and App - Prod. If I’m reading this site (http://docs.octopusdeploy.com/display/OD/Configuration+files) right, to make this work, I’d need to rename the configurations in Visual Studio from Debug, Release, and TestUAT to App - Dev, App - Test, and App - Prod. Is that true? If not, what am I missing? Thanks?

Hi Jeremy,

Thanks for getting in touch! Under Additional transforms you can define any rules that you like, so no you don’t have to rename them, or the environments to match.
web.Release.config would just work but for specific environments that you have named differently to your config you could create a variable in the project such as configEnvironment scope it to App - Test and with a value of TestUAT and then add the additional transform of web.#{configEnvironment}.config => web.config.

Hope that helps!
Vanessa

Thank you, Vanessa.

Conversely, if we decide to use variables instead (there is a desire to do this because we can control locations and servers in OD that way), is there a way to ensure that developer environments do not push transformation files up to the servers? While having a ..config file won’t cause problems, it does add additional unnecessary files to the deployment that we’d like to avoid sending.

Hi Jeremy,

There is nothing in Octopus that will hold back files in your packages and not deploy them. But someone wrote a library script for the explicit cleanup of config files.
https://library.octopusdeploy.com/#!/step-template/actiontemplate-file-system-clean-configuration-transforms

Vanessa

Thank you.