Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure App Service Deploy XML Transformation ctt.exe Not Taking Effect #4160

Closed
jamesaarondevlin opened this issue Apr 27, 2017 · 5 comments
Closed
Assignees
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release

Comments

@jamesaarondevlin
Copy link

Hi there,

I've started trying to implement the new XML Transformation feature found in version 3.* of the Azure App Service Deploy task.

I have made some progress and can see during the release that ctt is being called to perform the transformation. In this instance I am trying to transform Web.config according to Web.Regression.config. This environment is named 'Regression'.

image

Why would ctt.exe need to be called twice?

image

However when I double check my Web.config on the SCM site it appears to be using the default Web.config files as if it were unchanged.

Thanks for your time looking at this issue.

@jamesaarondevlin
Copy link
Author

jamesaarondevlin commented Apr 27, 2017

After investigating further I found that the token $(ReplacableToken_ was being inserted into the Web.config file of the deployed artifact during the deployment process.

I then found this post on Stackoverflow which lead me to add /p:AutoParameterizationWebConfigConnectionStrings=False to my MSBuild task in the build which created the artifact.

After making this change, rebuilding and re-releasing my transforms had taken effect.

It would be good if this conflict between MSBuild's auto parameterization and CTT could be advertised or at best resolved.

Thanks again,
James

@vincent1173
Copy link
Contributor

@jamesaarondevlin , thanks for reporting the issue and the workaround.
We doubt to add this flag in our build template as it will break many existing customers.
It becomes more user specific to include it in additional arguments.
Instead, We planned to raise a message explicitly in logs and help message.

Just a quick question, how did you create a package with transform config file ?
Did you remove the tag for your transform config in .csproj file ?

And, XML transformation is applied twice, because it will traverse through your package and if it finds valid config file and main config file, it applies the transformation.
In your case, the transformation is applied on PackageTmp folder and pakageTmp/bin folder.

@vincent1173 vincent1173 added Area: Release Area: AzureAppService Label to monitor Azure App Service issues labels Apr 27, 2017
@jamesaarondevlin
Copy link
Author

@vincentdass I agree with your conclusion to add a warning message and appreciate the quick reply.

You are correct regarding the csproj file. As a previous step in my work I removed the DependsUpon tag from each Content tag for my transform files.

image

Without this step ctt.exe would not get called during the execution of the Azure App Service Deploy task.

@vincent1173
Copy link
Contributor

#4125

@vincent1173
Copy link
Contributor

Help string and warning messsages are added and the fix will be available in upcoming deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release
Projects
None yet
Development

No branches or pull requests

2 participants