slowcheetah - XML transformation not working -
i have installed slowcheetah extension , nuget package console app project. have used context menu add uat build configuration , updated test setting check value being transformed.
unfortunately not, when try preview transform via context menu showing me non transformed app.config.
what steps can check see why extension not working?
in main app config have specified appsetting.
<appsettings> <add key="tomtesttransform" value="local" /> </appsettings>
in app.uat.config overwrite it
<appsettings> <add key="tomtesttransform" value="uat" /> </appsettings>
when preview transform, or build , check configuration output, using non transformed version. setting equals local.
you need use xdt:
attributes match , adapt elements, so:
<?xml version="1.0" encoding="utf-8" ?> <!-- more information on using transformations see web.comfig examples @ http://go.microsoft.com/fwlink/?linkid=214134. --> <configuration xmlns:xdt="http://schemas.microsoft.com/xml-document-transform"> <appsettings> <add key="tomtesttransform" value="uat" xdt:transform="replace" xdt:locator="match(key)" /> </appsettings> </configuration>
with xdt:locator="match(key)"
telling processor match add
element based on key
attribute, , apply xdt:transform="replace"
logic on whole (located) element.
there a msdn entry available on possible xml transformations, applicable slowcheetah transformations, based on same "technology".
additionally, extension overview has documentation in it!
Comments
Post a Comment