I have a web.config file that has the following elements:
<client>
<endpoint address="url_1" />
<endpoint address="url_2" />
<endpoint address="url_3" />
</client>
Now, I want to change it depending on the environment that I am deploying to. I have created a release pipeline that deploys to my dev and prod environment on Azure, I am using XML Variable Substitution to change whatever variables I need such as connectionString in my prod environment.
I want to change the 3 endpoint elements contents in the web.config file in my PROD environment as well.
For instance, it shoud look like this in the respective environments:
DEV:
<client>
<endpoint address="url_1" />
<endpoint address="url_2" />
<endpoint address="url_3" />
</client>
PROD:
<client>
<endpoint address="url_4" />
<endpoint address="url_5" />
<endpoint address="url_6" />
</client>
I looked into XML File Transformation, and I don't want to add onto the file. I want to remove url_1, url_2, url_3 and replace them with url_4, url_5, url_6
Is there a way on the release pipeline to accomplish this task without breaking the variable substitutions that I have added in place?



