简体   繁体   English

为什么从IEEE1641 STDTSF.xsd生成类时VS2015 xsd.exe报告错误

[英]Why VS2015 xsd.exe report error when generate classes from IEEE1641 STDTSF.xsd

I'm trying to generate C# classes from IEEE 1641 schemas: STDBSC.xsd and STDTSF.xsd using vs tool xsd.exe. 我试图生成IEEE 1641架构的C#类: STDBSC.xsdSTDTSF.xsd使用VS工具XSD.EXE。

The first one is converted successfully but the second one (STDTSF.xsd) failed with error: 第一个成功转换,但是第二个(STDTSF.xsd)失败,并显示以下错误:

missing element "urn:IEEE-1641:2010:STDBSC:Signal" 缺少元素“ urn:IEEE-1641:2010:STDBSC:Signal”

Could anyone kindly point out why is that? 有人可以指出为什么吗?

I placed STDBSC.xsd and STDTSF.xsd into the same folder. 我将STDBSC.xsd和STDTSF.xsd放入了同一文件夹。 And I executed commands in VS2015 Command at this folder. 我在该文件夹的VS2015 Command中执行了命令。 You can see STDBSC.cs was generated successfully. 您可以看到STDBSC.cs已成功生成。

xsd STDBSC.xsd /c
xsd STDTSF.xsd /c

在此处输入图片说明

I found the solution from @user1619480's answer for this SO post . 我从@ user1619480的答案中找到了此SO解决方案的解决方案。 The command should be: 该命令应为:

xsd STDBSC.xsd STDTSF.xsd /c

for generating classes for STDTSF.xsd since it referenced STDBSC.xsd 用于生成STDTSF.xsd的类,因为它引用了STDBSC.xsd

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM