Generated blank designer.cs file

Jan 7, 2010 at 9:21 PM

 

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://ns.opensocial.org/2008/opensocial" elementFormDefault="qualified" targetNamespace="http://ns.opensocial.org/2008/opensocial" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:complexType name="Activity">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element minOccurs="0" name="actor" type="tns:ActivityObject" />
            <xs:element minOccurs="0" name="context" type="tns:ActivityContext" />
            <xs:element minOccurs="0" maxOccurs="unbounded" name="links" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="unbounded" name="objects" type="tns:ActivityObject" />
            <xs:element minOccurs="0" name="source" type="tns:ActivityObject" />
            <xs:element minOccurs="0" name="target" type="tns:ActivityObject" />
            <xs:element minOccurs="0" maxOccurs="unbounded" name="verbs" type="xs:string" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="ActivityObject">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element minOccurs="0" maxOccurs="unbounded" name="owner" type="tns:ActivityObject" />
            <xs:element minOccurs="0" name="detail" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="unbounded" name="links" type="xs:string" />
            <xs:element minOccurs="0" name="source" type="tns:ActivityObject" />
            <xs:element minOccurs="0" name="time" type="xs:string" />
            <xs:element minOccurs="0" name="id" type="xs:string" />
            <xs:element minOccurs="0" name="title" type="xs:string" />
            <xs:element minOccurs="0" maxOccurs="unbounded" name="objectTypes" type="xs:string" />
        </xs:choice>
    </xs:complexType>
    <xs:complexType name="ActivityContext">
        <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element minOccurs="0" maxOccurs="unbounded" name="location" type="xs:string" />
        </xs:choice>
    </xs:complexType>
</xs:schema>Cou

Could not parse the following, generated design.cs with nothing but usings.

<?xml version="1.0" encoding="utf-8"?>

<xs:schema xmlns:tns="http://ns.opensocial.org/2008/opensocial" elementFormDefault="qualified" targetNamespace="http://ns.opensocial.org/2008/opensocial" xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:complexType name="Activity">

        <xs:choice minOccurs="0" maxOccurs="unbounded">

            <xs:element minOccurs="0" name="actor" type="tns:ActivityObject" />

            <xs:element minOccurs="0" name="context" type="tns:ActivityContext" />

            <xs:element minOccurs="0" maxOccurs="unbounded" name="links" type="xs:string" />

            <xs:element minOccurs="0" maxOccurs="unbounded" name="objects" type="tns:ActivityObject" />

            <xs:element minOccurs="0" name="source" type="tns:ActivityObject" />

            <xs:element minOccurs="0" name="target" type="tns:ActivityObject" />

            <xs:element minOccurs="0" maxOccurs="unbounded" name="verbs" type="xs:string" />

        </xs:choice>

    </xs:complexType>

    <xs:complexType name="ActivityObject">

        <xs:choice minOccurs="0" maxOccurs="unbounded">

            <xs:element minOccurs="0" maxOccurs="unbounded" name="owner" type="tns:ActivityObject" />

            <xs:element minOccurs="0" name="detail" type="xs:string" />

            <xs:element minOccurs="0" maxOccurs="unbounded" name="links" type="xs:string" />

            <xs:element minOccurs="0" name="source" type="tns:ActivityObject" />

            <xs:element minOccurs="0" name="time" type="xs:string" />

            <xs:element minOccurs="0" name="id" type="xs:string" />

            <xs:element minOccurs="0" name="title" type="xs:string" />

            <xs:element minOccurs="0" maxOccurs="unbounded" name="objectTypes" type="xs:string" />

        </xs:choice>

    </xs:complexType>

    <xs:complexType name="ActivityContext">

        <xs:choice minOccurs="0" maxOccurs="unbounded">

            <xs:element minOccurs="0" maxOccurs="unbounded" name="location" type="xs:string" />

        </xs:choice>

    </xs:complexType>

</xs:schema>

 

Jan 12, 2010 at 4:45 AM

Your schema does not define any top-level elements. Xsd2Code is based on .Net Framework CodeDom parsing of XML schema files, and one of the requirements for it to work is to have at least one top-level <xs:element /> element.

Jan 28, 2010 at 4:45 AM

Version 3.3 Beta has a Patch applied created by Rveer that Should fix this issue.