Transform a Web.config file in Azure Devops
So do you need to transform a web.config file in azure devops? So here is how you do it! First of all, add the task named “File transform”. After that you select “XML transformation”.
The important parts are the transformation rules and how you set up the config files in Visual Studio.
So what you want to do is, point “package or folder” to your website, the place where the pipline placed the project. In transformation rules you select the correct config file. In the example below, my config file for the test environment is named Web.Test.config, and it will be transformed into Web.config in the release.
Write this line in the Transformation rules and your Web.Test.config will be transformed, just like you want it to!
-transform **\*.Test.config -xml **\*.config