What is the right xdt:Locator parameter to transform this node?

Ok. I feel a little silly but the solution is that I didn’t need to specify a xdt:Locator. If I just leave the App.Release.Config like this it will replace matching entry. <parameter value=”data source=dbserver;Integrated Security=SSPI;Initial Catalog=someDb;MultipleActiveResultSets=true” xdt:Transform=”Replace”/> </parameters>

How to set debug false for release mode

Web.config transformations as they are defined in the Web.Release.config are only done when deploying/publishing the project for the relevant configuration. Just changing the active configuration in Visual Studio to Release and running the application does not run the transformations. Therefore, the web.config remains unchanged. This behavior is reasonable by the way as a web application … Read more

SlowCheetah not transforming file on build

For me I found the issue was that the slow cheetah property group in the config file was below the section where it checked if it existed. So the fix was simply to move the property group above that line somewhere which would allow the transform to run as expected. Put this: <PropertyGroup Label=”SlowCheetah”> <SlowCheetahToolsPath>$([System.IO.Path]::GetFullPath( … Read more

How do I make URL rewrite work with web.Release.config transform?

Transformation will only happen if you put proper xdt attributes on the elements that need to be transformed. Try adding an xdt:Transform attribute to your release config: <system.webServer xdt:Transform=”Replace”> <!– the rest of your element goes here –> </system.webServer> That will tell the transformation engine that the entire system.webServer element from Web.config needs to be … Read more

MSBuild Script and VS2010 publish apply Web.config Transform

I was looking for similar information and didn’t quite find it, so I did some digging around in the .targets files that come with Visual Studio 2010 and MSBuild 4.0. I figured that was the best place to look for the MSBuild task that would perform the transformation. As far as I have been able … Read more

How to remove a ConnectionString using Config Transformations

This will remove a specific connection string based on its name. <configuration> <connectionStrings> <add name=”ConnStr2″ xdt:Transform=”Remove” xdt:Locator=”Match(name)” connectionString=” ” /> </connectionStrings> </configuration> Note that the connectionString value is not empty string, but is instead a space. Any non-empty value would do.