无法将多行字符串设置为环境变量 [英] Can not set multi line string to environment variable
本文介绍了无法将多行字符串设置为环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在VSTS powershell任务上将多行字符串设置为环境变量.以下代码仅保存字符串的第一行.
How can I set multi line string to environment variable on VSTS powershell task. Following code only save the first line of the string.
[string] $ xmlstring =获取内容-编码UTF8-路径"$(System.DefaultWorkingDirectory)/apiPolicy.xml"-原始外弦;写主机("## vso [task.setvariable variable = policystring;]" + $ xmlstring)
推荐答案
不支持在构建或发布中使用多行变量,因此在构建/发布期间也无法将其设置为多变量.
Multiple lines variable in build or release is not supported, so it can’t be set the multiple variable during the build/release too.
相关的用户语音:构建和发布"中的多行变量.
使用base64字符串是一种好方法.
To do it with the base64 string is the good way.
这篇关于无法将多行字符串设置为环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文