0

I need help on web.config transformation as I'm trying to do something not documented. My web.config has an empty connectionStrings element.

In debug, I'd like the transformation tool to add a configSource="file.local" to the connectionStrings element. But in release, I'd like it to add a connectionString element.

So, to summarize, I have

<connectionStrings>
</connectionStrings>

And I need to transform it to

<connectionStrings configSource="file.local">
</connectionStrings>

And to:

<connectionStrings>
<clear/>
<add name="Abc" connectionString="bla bla bla" provider="xxx" />
</connectionStrings>

Anybody has done this yet?

Thanks in advance,

Fabian

1 Answer 1

1
<connectionStrings xdt:Transform="Replace">  
<clear/>  
<add name="Abc" connectionString="bla bla bla" providerName=""/>  
</connectionStrings>  
</configuration>  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.