Composite pattern causes VS 2010 to crash

Feb 21, 2012 at 6:06 PM

The following (valid) xsd causes VS 2010 to crash when asked to produce code:

This is an attempt to do a composite pattern (object can contain instances of objects of the same class).

  <xs:complexType name="metadataAssignmentPackageType">
    <xs:complexContent>
      <xs:extension base="basePublicationComponentType">
        <xs:sequence>
          <xs:element name="packages" minOccurs="0" maxOccurs="unbounded">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="package" type="metadataAssignmentPackageType" minOccurs="1" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
          <!-- other elements-->
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>