Disable Visual Studio's validation of non-xml files that look like xml?

前端 未结 3 1197
广开言路
广开言路 2021-01-11 11:52

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<

相关标签:
3条回答
  • 2021-01-11 12:18

    Have you tried: right-click on a .VM file, select Properties. There you can change the Build Action, you might want to set it to either Content or None.

    0 讨论(0)
  • 2021-01-11 12:32

    I add a comment as the first line of the vm file, that way the file doesn't begin with a < and VS doesn't think it's an xml file.

    Just add ## as the first line of every file then close and reopen it.

    0 讨论(0)
  • 2021-01-11 12:37

    Xml errors usually only show if the file is open.

    You can normally disable it by not opening it into the xml editor; the errors don't normally stop a build - they just look like they do. Right click -> Open With... Source (Text) Editor (or HTML if you prefer) (and set as default).

    0 讨论(0)
提交回复
热议问题