My nuget package contains:
- Web.config
–Web.BLSStaging.config
– Web.BLSUAT.config
I have a ‘Staging’ environment and ‘UAT’ environment. In my deploy nuget package step I have the following checked: XML transformation and Additional transforms set to #{TransformFile}. In my variables I have defined the following two variables:
- Name: TransformFile, Value: Web.BLSStaging.config, Environment: Staging, Machine: (empty), Step: (empty)
- Name: TransformFile, Value: Web.BLSUAT.config, Environment: UAT, Machine: (empty), Step: (empty)
The additional transforms are not being executed. Where am i going wrong?
If you rename your transform files to remove the BLS prefix:
- web.config
– web.staging.config
– web.uat.config
Also delete the project variables which are not required because the convention is that Octopus will automatically look for a transform that matches the environment it is being deployed to.
Nick,
Is there anyway I can get it to work with the transforms named as they are? My VS config mode is named as such?
Thanks
Not that I know of, but other options would include:
- Change your VS solution configurations to match your Octopus environments, i.e. UAT and Staging.
- Change Octopus environments to match your VS solution configurations, i.e. BLSStaging and BLSUAT
Nick
How do the additional transforms work?
Naeem
Which additional transforms?
It may be worth reviewing the documentation for XML Configuration Files, in particular the ‘Configuration File Transformations’ section.
In the XML configuration section there is the option to specify “Additional transforms”
[cid:image001.png@01CEDA11.D44C4330]
That is to support transforming files other than web.config files.
For example we have log4net configuration in a separate file with associated transforms:
- log4net.config
- log4net.staging.config
- log4net.uat.config
Octopus will automatically transform these during a deployment.