小编Bri*_*irt的帖子

SlowCheetah app.config transforms on multiple connection strings

I would like to be have multiple DB connection strings in my app.config file with the same server name. I am using SlowCheetah to perform transforms based on different configurations. Here is what I currently have, which works fine.

app.config contains:

<connectionStrings>
<add name="Catalog1String" connectionString="TO BE REPLACED" providerName="System.Data.SqlClient" />    
<add name="Catalog2String" connectionString="TO BE REPLACED" providerName="System.Data.SqlClient" />
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)

app.test-env.config contains:

<add name="Catalog1String" connectionString="Database=catalog1;Server=TestDbServer;Integrated Security=SSPI;Connection Timeout=60" xdt:Transform="Replace" xdt:Locator="Match(name)"/>
<add name="Catalog2String" connectionString="Database=catalog2;Server=TestDbServer;Integrated Security=SSPI;Connection Timeout=60" xdt:Transform="Replace" xdt:Locator="Match(name)"/>
Run Code Online (Sandbox Code Playgroud)

This works fine, but when I have …

xml xslt app-config slowcheetah

6
推荐指数
0
解决办法
689
查看次数

标签 统计

app-config ×1

slowcheetah ×1

xml ×1

xslt ×1