tool doesn't generate class

Nov 19, 2010 at 5:24 PM

this is an xsd file:

<?xml version="1.0"?>
<xs:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/PGTRegistrationRenewal.xsd" xmlns:t="http://tempuri.org/PGTRegistrationRenewal.xsd" xmlns="http://tempuri.org/PGTRegistrationRenewal.xsd" xmlns:mstns="http://tempuri.org/PGTRegistrationRenewal.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="type-tracking-number">
    <xs:restriction base="xs:token">
      <xs:length value="12"/>
      <xs:pattern value="CPSA.P[0-9]{6}"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:element name="pgt-registration-renewal">
    <xs:complexType>
      <xs:complexContent>
        <xs:restriction base="xs:anyType">
          <xs:sequence>
            <xs:element name="url_for_printing">
              <xs:complexType>
                <xs:complexContent>
                  <xs:restriction base="xs:anyType">
                    <xs:sequence />
                    <xs:attribute name="src" type="xs:anyURI" use="required" />
                  </xs:restriction>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
            <xs:element name="section-1">
              <xs:complexType>
                <xs:complexContent>
                  <xs:restriction base="xs:anyType">
                    <xs:sequence />
                    <xs:attribute name="surname" type="xs:string" use="required" />
                    <xs:attribute name="given_name" type="xs:string" use="required" />
                    <xs:attribute name="pgme_office_code" type="xs:string" use="required" />
                    <xs:attribute name="pgme_office_desc" type="xs:string" use="required" />
                    <xs:attribute name="program_name" type="xs:string" use="required" />
                    <xs:attribute name="position_type_code" type="xs:string" use="required" />
                    <xs:attribute name="position_type_desc" type="xs:string" use="required" />
                    <xs:attribute name="attendance_type_code" type="xs:string" use="required" />
                    <xs:attribute name="attendance_type_desc" type="xs:string" use="required" />
                    <xs:attribute name="email_address" type="xs:string" use="required" />
                    <xs:attribute name="start_date" type="xs:dateTime" use="optional" />
                    <xs:attribute name="projected_end_date" type="xs:dateTime" use="optional" />
                  </xs:restriction>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
            <xs:element name="payment-information">
              <xs:complexType>
                <xs:complexContent>
                  <xs:restriction base="xs:anyType">
                    <xs:sequence />
                    <xs:attribute name="total_amount" type="xs:decimal" use="required" />
                    <xs:attribute name="college_amount" type="xs:decimal" use="required" />
                    <xs:attribute name="gst_amount" type="xs:decimal" use="required" />
                    <xs:attribute name="hst_amount" type="xs:decimal" use="required" />
                    <xs:attribute name="transaction_time" type="xs:dateTime" use="required" />
                    <xs:attribute name="payment_method" type="xs:string" use="required" />
                    <xs:attribute name="authorization" type="xs:string" use="required" />
                    <xs:attribute name="reference" type="xs:string" use="required" />
                    <xs:attribute name="order_id" type="xs:string" use="required" />
                    <xs:attribute name="fee_name" type="xs:string" use="required" />
                  </xs:restriction>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="tracking_number" type="type-tracking-number" use="required" />
          <xs:attribute name="submitted_on" type="xs:dateTime" use="required" />
          <xs:attribute name="submitted_by" type="xs:string" use="required" />
        </xs:restriction>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
</xs:schema>

when  I  run class generator in vs 2010 I will get an empty class: pgtregistrationrenewal 
// ------------------------------------------------------------------------------
//  <auto-generated>
//    Generated by Xsd2Code. Version 3.4.0.38967
//    <NameSpace>Quest.Logic.XmlClasses</NameSpace><Collection>List</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>True</HidePrivateFieldInIDE><EnableSummaryComment>True</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>True</UseBaseClass><GenBaseClass>True</GenBaseClass><GenerateCloneMethod>True</GenerateCloneMethod><GenerateDataContracts>True</GenerateDataContracts><CodeBaseTag>Net35</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><EnableEncoding>False</EnableEncoding><AutomaticProperties>True</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>True</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>False</ExcludeIncludedTypes><EnableInitializeFields>False</EnableInitializeFields>
//  </auto-generated>
// ------------------------------------------------------------------------------
namespace Quest.Logic.XmlClasses
{
    using System;
    using System.Diagnostics;
    using System.Xml.Serialization;
    using System.Collections;
    using System.Xml.Schema;
    using System.ComponentModel;
    using System.IO;
    using System.Text;
    using System.Collections.Generic;
    using System.Runtime.Serialization;


    #region Base entity class
    public partial class EntityBase<T>
    {

        private static System.Xml.Serialization.XmlSerializer serializer;

        private static System.Xml.Serialization.XmlSerializer Serializer
        {
            get
            {
                if ((serializer == null))
                {
                    serializer = new System.Xml.Serialization.XmlSerializer(typeof(T));
                }
                return serializer;
            }
        }

        #region Serialize/Deserialize
        /// <summary>
        /// Serializes current EntityBase object into an XML document
        /// </summary>
        /// <returns>string XML value</returns>
        public virtual string Serialize()
        {
            System.IO.StreamReader streamReader = null;
            System.IO.MemoryStream memoryStream = null;
            try
            {
                memoryStream = new System.IO.MemoryStream();
                Serializer.Serialize(memoryStream, this);
                memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
                streamReader = new System.IO.StreamReader(memoryStream);
                return streamReader.ReadToEnd();
            }
            finally
            {
                if ((streamReader != null))
                {
                    streamReader.Dispose();
                }
                if ((memoryStream != null))
                {
                    memoryStream.Dispose();
                }
            }
        }

        /// <summary>
        /// Deserializes workflow markup into an EntityBase object
        /// </summary>
        /// <param name="xml">string workflow markup to deserialize</param>
        /// <param name="obj">Output EntityBase object</param>
        /// <param name="exception">output Exception value if deserialize failed</param>
        /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
        public static bool Deserialize(string xml, out T obj, out System.Exception exception)
        {
            exception = null;
            obj = default(T);
            try
            {
                obj = Deserialize(xml);
                return true;
            }
            catch (System.Exception ex)
            {
                exception = ex;
                return false;
            }
        }

        public static bool Deserialize(string xml, out T obj)
        {
            System.Exception exception = null;
            return Deserialize(xml, out obj, out exception);
        }

        public static T Deserialize(string xml)
        {
            System.IO.StringReader stringReader = null;
            try
            {
                stringReader = new System.IO.StringReader(xml);
                return ((T)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
            }
            finally
            {
                if ((stringReader != null))
                {
                    stringReader.Dispose();
                }
            }
        }

        /// <summary>
        /// Serializes current EntityBase object into file
        /// </summary>
        /// <param name="fileName">full path of outupt xml file</param>
        /// <param name="exception">output Exception value if failed</param>
        /// <returns>true if can serialize and save into file; otherwise, false</returns>
        public virtual bool SaveToFile(string fileName, out System.Exception exception)
        {
            exception = null;
            try
            {
                SaveToFile(fileName);
                return true;
            }
            catch (System.Exception e)
            {
                exception = e;
                return false;
            }
        }

        public virtual void SaveToFile(string fileName)
        {
            System.IO.StreamWriter streamWriter = null;
            try
            {
                string xmlString = Serialize();
                System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
                streamWriter = xmlFile.CreateText();
                streamWriter.WriteLine(xmlString);
                streamWriter.Close();
            }
            finally
            {
                if ((streamWriter != null))
                {
                    streamWriter.Dispose();
                }
            }
        }

        /// <summary>
        /// Deserializes xml markup from file into an EntityBase object
        /// </summary>
        /// <param name="fileName">string xml file to load and deserialize</param>
        /// <param name="obj">Output EntityBase object</param>
        /// <param name="exception">output Exception value if deserialize failed</param>
        /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
        public static bool LoadFromFile(string fileName, out T obj, out System.Exception exception)
        {
            exception = null;
            obj = default(T);
            try
            {
                obj = LoadFromFile(fileName);
                return true;
            }
            catch (System.Exception ex)
            {
                exception = ex;
                return false;
            }
        }

        public static bool LoadFromFile(string fileName, out T obj)
        {
            System.Exception exception = null;
            return LoadFromFile(fileName, out obj, out exception);
        }

        public static T LoadFromFile(string fileName)
        {
            System.IO.FileStream file = null;
            System.IO.StreamReader sr = null;
            try
            {
                file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
                sr = new System.IO.StreamReader(file);
                string xmlString = sr.ReadToEnd();
                sr.Close();
                file.Close();
                return Deserialize(xmlString);
            }
            finally
            {
                if ((file != null))
                {
                    file.Dispose();
                }
                if ((sr != null))
                {
                    sr.Dispose();
                }
            }
        }
        #endregion

        #region Clone method
        /// <summary>
        /// Create a clone of this T object
        /// </summary>
        public virtual T Clone()
        {
            return ((T)(this.MemberwiseClone()));
        }
        #endregion
    }
    #endregion

    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml""4.0.30319.1")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://tempuri.org/PGTRegistrationRenewal.xsd")]
    [System.Xml.Serialization.XmlRootAttribute("pgt-registration-renewal", Namespace = "http://tempuri.org/PGTRegistrationRenewal.xsd", IsNullable = false)]
    [System.Runtime.Serialization.DataContractAttribute(Name = "pgtregistrationrenewal", Namespace = "http://tempuri.org/PGTRegistrationRenewal.xsd")]
    public partial class pgtregistrationrenewal : EntityBase<pgtregistrationrenewal>
    {
    }
}

The same is ahappening when I use xsd.exe
Thanks for help

Marek.