简体   繁体   English

为架构'onvif'生成类时出错

[英]Error generating classes for schema 'onvif'

I'm currently trying to generate classes from a .xsd file that is accessible from: https://www.onvif.org/ver10/schema/onvif.xsd 我当前正在尝试从可从以下位置访问的.xsd文件生成类: https : //www.onvif.org/ver10/schema/onvif.xsd

I saved that .xsd file in a folder on my computer. 我将该.xsd文件保存在计算机上的文件夹中。

I opened a Developer Command Prompt for VS 2017 as administrator. 我以管理员身份打开了VS 2017的开发人员命令提示符。

I went under C:...\\myFolder . 我在C:... \\ myFolder下。

I then used the xsd /c onvif.xsd command to create my classes/get a .cs file, but i keep getting a bunch of warnings and the error: 然后,我使用xsd /c onvif.xsd命令创建我的类/获取一个.cs文件,但我不断收到一堆警告和错误消息:

Error: Error generating classes for schema 'onvif'. 错误:为架构'onvif'生成类时出错。

As anyone ever had that error? 有人曾经犯过这个错误吗?

How do i get rid of it? 我如何摆脱它?

In the onvif.xsd file, there's a reference to the http://docs.oasis-open.org/wsn/b-2.xsd file... 在onvif.xsd文件中,有对http://docs.oasis-open.org/wsn/b-2.xsd文件的引用... IMG 0

If i look a bit further, i can see that the wsnt "namespace" is used to get FilterType a couple of times... 如果再往前看,我可以看到wsnt “命名空间”曾FilterType用于获取FilterType ……

IMG1 IMG2

and, when i look into the http://docs.oasis-open.org/wsn/b-2.xsd file, I can see that the datatype FilterType apearing in my error is there... 并且,当我查看http://docs.oasis-open.org/wsn/b-2.xsd文件时,我可以看到错误中出现的数据类型FilterType出现了...

IMG3

I think you need the b-2.xsd schema. 我认为您需要b-2.xsd模式。 You can find it here: http://docs.oasis-open.org/wsn/b-2.xsd 您可以在这里找到它: http : //docs.oasis-open.org/wsn/b-2.xsd

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

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