Why are multiple config transformations performed?

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

Why are multiple config transformations performed?

Postby hennieg » Tue Sep 10, 2013 4:58 pm

Hi,

I am using DM to deploy a project to a server in the Staging environment. I have two config files with associated transformation files for staging, i.e.:

log4net.staging.config
web.staging.config.

When I check the logging and the end result of the transformations, I first see log4net.release.config processed subsequently followed by log4net.staging.config. I would only expect log4net.staging.config to be processed. (Same goes for web.config).

Am I wrong in expecting only the transformation file for the current environment to be processed? Any help or explanation would be appreciated.

Thanks,
Hennie Gottenbos.

Here is an excerpt from the deployment log:

2013-09-10 15:47:22 INFO Looking for any configuration transformation files
2013-09-10 15:47:22 DEBUG Start tranformation to 'C:\\ProgramData\\Red Gate\\DeploymentAgent\\Applications\\Staging\\ICTZKlantportaal\\1.0.64\\log4net.config'.
2013-09-10 15:47:22 DEBUG Source file: 'C:\\ProgramData\\Red Gate\\DeploymentAgent\\Applications\\Staging\\ICTZKlantportaal\\1.0.64\\log4net.config'.
2013-09-10 15:47:22 DEBUG Transform file: 'C:\\ProgramData\\Red Gate\\DeploymentAgent\\Applications\\Staging\\ICTZKlantportaal\\1.0.64\\log4net.Release.config'.
2013-09-10 15:47:22 DEBUG Start tranformation to 'C:\\ProgramData\\Red Gate\\DeploymentAgent\\Applications\\Staging\\ICTZKlantportaal\\1.0.64\\log4net.config'.
2013-09-10 15:47:22 DEBUG Source file: 'C:\\ProgramData\\Red Gate\\DeploymentAgent\\Applications\\Staging\\ICTZKlantportaal\\1.0.64\\log4net.config'.
2013-09-10 15:47:22 DEBUG Transform file: 'C:\\ProgramData\\Red Gate\\DeploymentAgent\\Applications\\Staging\\ICTZKlantportaal\\1.0.64\\log4net.Staging.config'.

[I left out the log entries showing the values being applied]
hennieg
 
Posts: 1
Joined: Tue Sep 10, 2013 4:52 pm

Postby DavidSimner » Wed Sep 11, 2013 9:58 am

For each config file, we apply the Release transform, followed by the transform for the environment that you're deploying to.

This is why the log4net config file is shown in your logs as being transformed twice, first by log4net.Release.config and then by log4net.Staging.config.

The reason we designed it this way, is that typically in Visual Studio there are 2 solution configurations: Debug and Release. When users do deployments through Deployment Manager, they expect the Release configuration to take effect, so we apply its config transform.
DavidSimner
 
Posts: 49
Joined: Thu Feb 04, 2010 6:05 pm


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests