如何在VSTS上的网站SetParameters.xml文件中使用包含XML字符串的令牌?

问题描述 投票:0回答:1

在VSTS上,我使用“替换标记”任务用VSTS变量替换SetParameters.xml文件中的标记。但我有包含XML字符串的变量。例如,使用包含以下内容的VSTS变量:

<string>aaa</string><string>bbb</string><string>ccc</string>

我进入了SetParameters.xml:

<setParameter name="FolderTreeStructureRootFullControl" value="<string>aaa</string><string>bbb</string><string>ccc</string>" />

之后,当我使用“WinRM - IIS Web App部署”任务部署网站时,出现此错误:

System.Exception: Error: '<', hexadecimal value 0x3C, is an invalid attribute character.

有没有办法解决这个错误而不用&lt;&gt;转义字符串替换所有'<'和'>'字符?

谢谢。

token webdeploy azure-pipelines-release-pipeline winrm
1个回答
0
投票

不,你不能,我建议你可以将值编码为base64并解码代码中的值。

© www.soinside.com 2019 - 2024. All rights reserved.