.netvisual-studio-2010compilationxsdcustom-build-step

Xsd validation vs2010


Motivation: I want Cause compilation error when xml in project doesn't meet its xsd.

Tried to change build action of the xml to compile but it didn't work I suppose that VS2010 trying to compile it with .NET compiler.

Is there any way to achieve it ? (changing the default building tool for xml or any other way)

Thanks


Solution

  • Try using msbuildextensionpack's XmlTask named Validate: http://www.msbuildextensionpack.com/help/4.0.5.0/html/3d383fd0-d8a7-4b93-3e03-39b48456dac1.htm