The conversion works in accordance with the specified online browsing tool for web.config conversions https://webconfigtransformationtester.apphb.com/ when changing the namespace on the Internet. config from
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
to
<configuration xmlns:xdt="http://schemas.microsoft.com/.NetConfiguration/v2.0">
When is this conversion
<?xml version="1.0" ?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <system.web> <compilation xdt:Transform="RemoveAttributes(debug)" /> </system.web> </configuration>
applies to configured web.config
<?xml version="1.0" ?> <configuration xmlns:xdt="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <system.web> <compilation debug="true" targetFramework="4.0"> </compilation> </system.web> </configuration>
the debug attribute is removed from the result:
<?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <system.web> <compilation targetFramework="4.0"> </compilation> </system.web> </configuration>
Update: As mentioned in the comments, the configuration of the web.config file should not have any namespace at all. Instead, add this import
<xdt:Import assembly="AppHarbor.TransformTester" namespace="AppHarbor.TransformTester.Transforms"/>
to the conversion file (at least when testing with the specified online transformation test):
<?xml version="1.0"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <xdt:Import assembly="AppHarbor.TransformTester" namespace="AppHarbor.TransformTester.Transforms"/> <system.web> <compilation xdt:Transform="RemoveAttributes(debug)" /> </system.web> </configuration>
source share