Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Config Transformation to add a child element

I've got the following configuration in web.config:

  <resizer>     <sizelimits imageWidth="0" />     <plugins>       <add name="MvcRoutingShim" />       <!--<add name="AzureReader" connectionString="DataConnectionString" /> -->       <add name="DiskCache" />       <add name="PrettyGifs" />       <add name="AnimatedGifs" />     </plugins>   </resizer> 

In web.config.Release, how can I add the AzureReader element as a child of the plugins element (effectively uncommenting out the above)?

I'm familiar with how to do basic transformations but have never done this before.

like image 605
Ben Foster Avatar asked Jun 14 '12 12:06

Ben Foster


1 Answers

You can use the Insert transformation:

 <resizer>     <plugins>       <add name="AzureReader" connectionString="DataConnectionString"             xdt:Transform="Insert" />     </plugins>   </resizer> 

Web.config Transformation Syntax for Web Application Project Deployment

like image 148
jrummell Avatar answered Sep 30 '22 23:09

jrummell