I have a Web.config with several ConnectionStrings
<connectionStrings>
<add name="connStr1" connectionString="...
<add name="ConnStr2" connectionString="...
<add name="connStr3" connectionString="...
Is there a way using config transformations to remove a specific connectionstring? Something Like:
<connectionStrings>
<xdt:Remove connStr2?
Obviously no where near the correct syntax, but you get my drift...
From the MSDN documentation on the subject:
The
Transform="Remove"
is the magic you're looking for. There is also aTransform="RemoveAll"
which you might be able to use in conjunction with a specific add(s).EDIT
On second thought you may also be able to combine the
Locator
attribute with theRemove
defined above to limit which elements you actually want to delete.More definitively:
Or similar should work.