Remove XML comments using Visual Studio 2010 Web Config Transformation

.net, transformation, visual-studio-2010, web-config

Solution

I've found an answer. It seems this is a known bug in the XDT transformation engine in Visual Studio/Team Build. This bug was reported in March, so no idea when this will be fixed.

Here's the link

Edit: This link actually isn't related to the original question. We eventually figured it wasn't possible with the built-in web config transformations. So we ended up writing a console application to strip comments, and properly format the transformed file.

Problem

We are using Team Build to handle our deployments to our development server, and we have a need to remove comments from our web config when it's transformed. Does anyone know how to remove the `<!-- -->` comment lines from the web config file using a transformation?

Original source