json - Azure DevOps Pipeline Json 变量替换 - Microsoft.Hosting.Lifetime
问题描述
如何使用 Azure DevOps 中的 Json 变量替换任务更改 Logging:LogLevel:Microsoft.Hosting.Lifetime 的值?
本文...
...状态:
If a variable name includes periods ("."), the transformation will attempt to locate the item within the hierarchy. For example, if the variable name is first.second.third, the transformation process will search for:
"first" : {
"second": {
"third" : "value"
}
}
as well as "first.second.third" : "value".
这些都不能以名称中带有句点 (.) 的嵌套值为目标?正确的?
解决方案
这些都不能以名称中带有句点 (.) 的嵌套值为目标?正确的?
抱歉,恐怕你现在不能这样做JSON variable substitution
。官方文档已经声明该JSON variable substitution
选项不支持名称中包含句点的变量。它不受设计支持,并且已经记录在Notes中。
作为替代解决方法:
您可以用另一种格式定义变量名称,例如
Logging:LogLevel:Microsoft_Hosting_Lifetime
.尝试使用Replace Token 任务来更改
Logging:LogLevel:Microsoft.Hosting.Lifetime
. 此任务应该适用于您的方案。有关更多详细信息,您可以查看此问题。您也可以在我们的UserVoice 网站
JSON variable substitution
上提交关于选项 的功能请求,这是我们产品建议的主要论坛。如果产品团队查看更新,他们将提供更新。感谢您帮助我们构建更好的 Azure DevOps。
推荐阅读
- html - 具有居中水平图像列表的褪色效果
- javascript - 使用 uikit 展开下拉菜单
- sql - 数据库中缺少表但查询有效
- c# - 具有两个类的文件中的 StackOverFlowException
- python - Python Selenium 自动化 Twitter 点赞
- r - 为什么我的 while 循环卡住了?- 在 R 中编程
- php - 在 Woocommerce 中添加自定义结帐字段时出现空白结帐页面
- scikit-learn - 哪个模型:gridsearchCV 或所有训练数据的最佳估计器?
- c# - 用什么?我用什么来制作一个使用 c# 打开 .obj 和 .dae 的程序?
- php - 我们可以通过 ajax 请求劫持 CSRF 令牌吗