使用xsd.exe(VS2010)从xsd生成C#代码时发生StackOverFlowException

Sta*_*fan 3 c# xsd.exe

我试图使用带有Visual Studio RC1(版本10.0.30128.1)的xsd.exe从XML模式生成C#代码,但是得到以下错误:

C:\ Development> xsd CR2008Schema.xsd/classes Microsoft(R)Xml架构/数据类型支持实用程序[Microsoft(R).NET Framework,版本4.0.30128.1]版权所有(C)Microsoft Corporation.所有权利都需要

由于StackOverflowException,进程终止.

xsd是http://www.businessobjects.com/products/xml/CR2008Schema.xsd

任何帮助赞赏.

谢谢,

斯塔

Ode*_*ded 5

这可能是因为Group定义了以下集合Group:

<!--    Group   -->
<xsd:complexType name="Group">
  <xsd:sequence>
    <xsd:element name="GroupHeader" type="HeaderFooter" minOccurs="0"/>
      <xsd:choice>
        <xsd:element name="Details" type="Details" minOccurs="0" maxOccurs="unbounded"/>
        <xsd:element name="Group" type="Group" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:choice>
    <xsd:element name="GroupFooter" type="HeaderFooter" minOccurs="0"/>
  </xsd:sequence>
  <xsd:attribute name="Level" type="xsd:integer" use="required"/>
</xsd:complexType>
Run Code Online (Sandbox Code Playgroud)

xsd.exe 进入无限循环......