gpt4 book ai didi

asp.net-core - 在 Azure DevOps 管道中设置连接字符串

转载 作者:行者123 更新时间:2023-12-01 12:09:12 25 4
gpt4 key购买 nike

我有一些我想针对 LocalDB 运行的集成测试。

我的 config.json 文件有以下部分...

{
"ConnectionStrings": {
"DefaultConnection": ""
}
}

是否可以在构建配置中设置此值?

最佳答案

您可以通过多种方式实现这一目标。像 Powershell 脚本一样替换值,当然 this replace token extension


你应该像下面这样定义你的变量

{
"ConnectionStrings": {
"DefaultConnection": "#{connectstring}#"
}
}

在部署期间,它将被您的实际值替换。

Refer this SO for more details

关于asp.net-core - 在 Azure DevOps 管道中设置连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53637328/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com