Hi!
I'm using the AzureRmWebAppDeployment task (version 3) and trying to transform my Web.config file. The task outputs that everything went fine ("XML Transformations applied successfully") but the Web.config still has the same values as the original. My setup is:
And if I preview the transforms in visual studio everything looks good.
Also found a thread on the same topic here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/32b75db8-f6a5-4c5e-9e4e-251d01092b0b/deploy-azure-app-service-3-xml-transformation-does-not-transform-webconfig-on-release-vsts?forum=TFService
//Oskar
@LarssonOskar,
If you are using MsDeploy Package for deployment, we have added some more guidance on how to get this working in new version of our task 3.3.6 which should reach to your account in a couple of weeks.
I am briefing the same here for you. Can you try these suggestions and let us know?
<DependentUpon> tag for each config in the csproj file and rebuild. Hi @mvvsubbu and thanks for your reply!
Removing <DependentUpon> in the csproj file worked and the task now transforms the configs correctly! :+1:
Thanks for confirming I am going ahead and closing the issue
@mvvsubbu i have tried all to alternative solution that are explained here. but nothing worked for me and i get error Error: XML transformation error while transforming.
I moved my web.test.config tranformation file to the root to the web.config and then it worked. Thanks for this article.
Most helpful comment
@LarssonOskar,
If you are using MsDeploy Package for deployment, we have added some more guidance on how to get this working in new version of our task 3.3.6 which should reach to your account in a couple of weeks.
I am briefing the same here for you. Can you try these suggestions and let us know?
To Skip Applying Web.Production.Config on your Web.Config during Msbuild, you need to update your Web.Production.Config files
<DependentUpon>tag for each config in the csproj file and rebuild.To Skip Overriding Connection String value, with default value in the package.