I have a bunch of Velocity template files in a Visual Studio 2008 project, the problem is that despite the fact that the extension is .vm
instead of .xml
or similar Visual Studio thinks that the HTML they contains must conform to XML naming standards and generates errors (not just warnings even) on each compilation.
How do I tell Visual Studio to ignore these "faulty" XML files? I am willing to turn of all validation on XML but I have found no such option either.
Update, the errors don't stop the build they just drown the real errors behind about 20 validation errors. I seem to remember an option to turn off validation in VS 2005 but I can't find any such option in VS 2008.
I'm accepting adding ##
to the beginning of the file as answer, it does the trick even if it's ugly. Thanks Nir!
Update 2 I thought I had tried your answer before Marc and found that it wasn't properly remembered. But now that I tried it again it does work very well, and it's cleaner than adding a comment to every file. Re-rewarding the accepted answer.