Eric Sjöström Jennerstrand

Litium E-commerce, C#, .NET MAUI, Javascript, React, Azure, Git. .NET, Node and more!
Dot Net

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
Transform a Web.config file in Azure Devops - -transform **\*.Test.config -xml **\*.config
Transform a Web.config file in Azure Devops

Leave a Reply

Your email address will not be published. Required fields are marked *.

*
*
You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>