我有 2 个配置文件,ConnectionStrings.config 和 ConnectionStrings.Release.config。这些文件用于存储我们在应用程序中使用的各种连接字符串。
<?xml version="1.0" standalone="yes"?>
<ConnectionStrings xmlns="http://tempuri.org/ConnectionStrings.xsd">
<Service>
<Name>MyService</Name>
<Address>http://localhost/#{ConnectionString}#/MyServiceService.svc</Address>
<ClassName>MyClass, MyClass</ClassName>
</Service>
</ConnectionStrings>
当我们在本地部署时,我们使用正常的 ConnectionStrings.config,文件中没有任何替换标记。.release.config 是具有令牌的那个。
我正在使用这 2 个市场任务 [我的发布管道中的任务] 1
据我了解,转换任务正在获取 .release.config 文件并“重命名”.config,然后替换令牌任务用我的管道中的变量替换必要的令牌。最后我将这些复制到我的目标。我的复制任务来源是我在 Azure 中的 Git 工作目录。
当我检查结果时,我没有看到 ConnectionStrings.config 根本没有改变,它只是像本地部署一样被复制过来。
我究竟做错了什么?