问题描述
使用 VS 2013 附带的 XSD 工具,我收到以下消息,尝试从包含 - 的 xsd 生成类>
架构验证警告:' 警告:无法验证架构.类生成可能会失败或产生错误的结果. 错误:为架构测试"生成类时出错.- 元素 ' 这是一个演示问题的缩减版 xsd: 我很确定导入和命名空间没问题.Resharper 和 VS Schema Designer 不会抱怨.我怀疑这是该工具不做的事情. 有什么想法可以继续吗? 原来这里已经回答了这个问题. https://stackoverflow.com/a/17278163/2516770 我需要将导入的文件添加到xsd命令行参数的文件列表中: Using the XSD tool included with VS 2013, I receive the following message trying to generate a class from an xsd that contains This is a cut down xsd that demonstrates the problem: I'm pretty sure the import and namespaces are okay. Resharper and the VS Schema Designer do not complain. I suspect that this is something that the tool just doesn't do. Any ideas how I can proceed? It turns out that this has been answered here. https://stackoverflow.com/a/17278163/2516770 I need to add the imported file to the file list of the xsd command line parameters: 这篇关于“缺少元素……"尝试使用 <element ref =/> 生成类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!xsd test.xsd
<xsd:element ref=.../>
-<?
xsd test.xsd