title: VS2008: Running xsd.exe on schema file gives XMLSchema:datetime is not declared
body: <p>I have a an XSD that looks like this (roughly)</p>
  
  <pre><code>&lt;xs:schema id="Appointment" targetNamespace="http://tempuri.org/Record.xsd" elementFormDefault="qualified"
  attributeFormDefault="qualified" xmlns="http://tempuri.org/Record.xsd" xmlns:mstns="http://tempuri.org/Record.xsd"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"&gt;
  &lt;xs:element name="Record" msdata:IsDataSet="true"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:choice maxOccurs="unbounded"&gt;
              &lt;xs:element name="Record"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element name="ID" type="xs:string" minOccurs="0" /&gt;
                          &lt;xs:element name="TimeStart" type="xs:datetime" minOccurs="0" /&gt;
                          &lt;xs:element name="TimeEnd" type="xs:datetime" minOccurs="0" /&gt;
                      &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
          &lt;/xs:choice&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>When I try to generate classes from it using the xsd.exe from VS2008 I get string fields instead of date fields, and a warning that </p>
  
  <pre><code>Schema validation warning: Type 'http://www.w3.org/2001/XMLSchema:datetime' is not declared. Line 13, position 9.
  </code></pre>
  
  <p>Any clues?</p>