Options

Why are multiple config transformations performed?

hennieghennieg Posts: 2
edited September 11, 2013 4:58AM in Deployment Manager
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]

Comments

  • Options
    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.
Sign In or Register to comment.