开发者

Validate an XML file as a build event

开发者 https://www.devze.com 2022-12-15 04:38 出处:网络
I was wondering if there was a way to validate XML files as part of a pre-build event, so that I can go back and fix the problem before the app starts up.

I was wondering if there was a way to validate XML files as part of a pre-build event, so that I can go back and fix the problem before the app starts up.

I'm aware of (and use开发者_JAVA百科) code to validate XML files on application startup as part of serialization (XmlReaderSettings with ValidationEventHandler), but I'd like some way of validating the XML before the app starts running.

Is this possible?

Thanks in advance.


Probably a script task provided in msbuildtasks in your build file may be sufficient for validating.

0

精彩评论

暂无评论...
验证码 换一张
取 消