1

How can I update the filename attribute below using a variable?

I added a Replace Transmission task, but how to update the values (filename="y.zip", based on my variable) inside an .xml file using pipeline tasks?

<?xml version="1.0" encoding="utf-16"?>
<configdata>
  <solutions>
    <configsolutionfile filename="x.zip" />
  </solutions>
</configdata>
0

2 Answers 2

3

You have few options:

It all actually depends at which stage you want to achieve and what you have already. If you want to do it before generating package I would recommend first option - token replace. If you want to do it after (= just before publishing the package) and you have already config transformation files, you can go with XML transformation. Last one is convinient if you don't want to use tranformation files and you want to do it just before publishing the package.

Sign up to request clarification or add additional context in comments.

Comments

0

Krzysztof Madej is correct. And I would also like to add the following points.

  1. Here is an extension: XDT Transform. This extension contains the "XDT Transform" task. This task also supports to transform XML file transformation.

  2. You also could try to use "File transform " task.

  3. If you want to deploy the application to Azure or IIS , the Azure App Service Deploy task and IIS Web App Deploy task support file transforms and variable substitution.

Hope this helps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.