I am using web.config conversions available through VS2010. In this case, I wonder if it is possible to "surround" the element with another during the conversion. Here is an example:
default web.config contains:
<configuration> <system.web> .... </system.web> </configuration>
My converted file should contain
<configuration> <location inheritInChildApplications="false"> <system.web> ... </system.web> </location> </configuration>
So essentially, I want to βwrapβ the system.web element with a location element. My only thought was to make the conversion so that I insert before and after, like:
<location inheritInChildApplications="false" xdt:Transform="InsertBefore(/configuration/system.web)"> </location xdt:Transform="InsertAfter(/configuration/system.web)">
But the closing location element is invalid xml according to VS (I guess due to the Transform attribute). Just inserting an element of a self-closing location before system.web doesn't help, because the resulting system.web is still not "surrounded".
web-config msbuild web-config-transform
mdarnall
source share