2010-06-11 12 views
0

J'ai besoin d'aide pour la transformation web.config car j'essaie de faire quelque chose qui n'est pas documenté. Mon web.config a un élément connectionStrings vide. En debug, j'aimerais que l'outil de transformation ajoute un configSource = "file.local" à l'élément connectionStrings. Mais dans la version, je voudrais ajouter un élément connectionString.VS 2010 transformation web.config

Donc, pour résumer, je

<connectionStrings> 
</connectionStrings> 

Et je dois transformer en

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

Et:

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

Tout le monde a encore fait?

Merci à l'avance,

Fabian

Répondre

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