Reputation: 455
I created a release pipeline it is working very well but the XML transformation part is not working as I wanted.
I gave a name for my stage as "Development" and I have "Web.Development.config" file as I showed below, I checked the "XML transformation option" but not is changed. When I add "Web.Release.config" it works but I want to use "Web.Development.config" for the Development environment, I want to use "Web.Production.config" for the Production environment.
When I removed the "Web.Release.config" nothing happens.
When I added the "Web.Release.config" nothing happens. It is skipping or not using "Web.Development.config".
What am I missing? What is the wrong part?
Upvotes: 3
Views: 1015
Reputation: 455
After trying a lot of things, finally, I found a solution to my problem. These are the steps:
Go to your release definition and check the XML transformation option.
Make sure that you gave the same name to your stage with your *..config file. You can check this link for more details: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/transforms-variable-substitution?view=azure-devops
Upvotes: 2
Reputation: 39898
By default Azure DevOps uses your web.config
and web.release.config
and then applies an environment specific config. There is no way to exclude web.release.config
from your transformations except from renaming/deleting the file.
See the docs on XML Transformation for all the details.
Upvotes: 0