dotnet / ef6tools

This is the codebase for the Entity Framework 6 and LINQ-To-SQL designers.
MIT License
35 stars 14 forks source link

System.Data.Resources.ProviderServices.ProviderManifest.xsd is missing HierarchyId #42

Closed ErikEJ closed 1 year ago

ErikEJ commented 1 year ago

This causes error messages in the designer, as VS picks up the .xsd file without HierarchyId primitive type (using an alternate EF6 SqlClient provider that depends on Microsoft.Data.SqlClient)

The error is:

Severity    Code    Description Project File    Line    Suppression State   Priority
Error       Error 168: The Provider Manifest is incorrect.
<File Unknown>(167,34) : error 0005: The 'PrimitiveTypeKind' attribute is invalid - The value 'HierarchyId' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2006/04/edm/providermanifest:TPrimitiveTypeKind' - The Enumeration constraint failed.
<File Unknown>(167,10) : error 0122: The value 'HierarchyId' is not a valid PrimitiveTypeKind.  SmokeTestNetFx  C:\Code\Github\EntityFramework6PowerTools\test\SmokeTestNetFx\Model1.edmx   7       Normal

Can not see any history stating why this was removed??

https://github.com/dotnet/ef6tools/blob/main/src/EntityFramework/Resources/System/Data/System.Data.Resources.ProviderServices.ProviderManifest.xsd

<xs:simpleType name="TPrimitiveTypeKind">
        <xs:restriction base="xs:string">
            <xs:enumeration value="Binary" />
            <xs:enumeration value="Boolean" />
            <xs:enumeration value="Byte" />
            <xs:enumeration value="Decimal" />
            <xs:enumeration value="DateTime" />
            <xs:enumeration value="Time" />
            <xs:enumeration value="DateTimeOffset" />
            <xs:enumeration value="Double" />
            <xs:enumeration value="Geography" />
            <xs:enumeration value="Geometry" />
            <xs:enumeration value="Guid" />
            <xs:enumeration value="Single" />
            <xs:enumeration value="SByte" />
            <xs:enumeration value="Int16" />
            <xs:enumeration value="Int32" />
            <xs:enumeration value="Int64" />
            <xs:enumeration value="String" />
        </xs:restriction>
    </xs:simpleType>

vs

https://github.com/dotnet/ef6/blob/main/src/EntityFramework/Resources/System/Data/System.Data.Resources.ProviderServices.ProviderManifest.xsd

<xs:simpleType name="TPrimitiveTypeKind">
        <xs:restriction base="xs:string">
            <xs:enumeration value="HierarchyId" />
        </xs:restriction>
    </xs:simpleType>
ErikEJ commented 1 year ago

The "bad" file is located here, and based on content seems to come form another place entirely ??

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Xml\Schemas\System.Data.Resources.ProviderServices.ProviderManifest.xsd

Contents:

<xs:simpleType name="TPrimitiveTypeKind">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Binary"/>
      <xs:enumeration value="Boolean"/>
      <xs:enumeration value="Byte"/>
      <xs:enumeration value="Decimal"/>
      <xs:enumeration value="DateTime"/>
      <xs:enumeration value="Time"/>
      <xs:enumeration value="DateTimeOffset"/>        
      <xs:enumeration value="Double"/>
      <!--- TODO: Spatial: only support the union types here for now.   Once we deeply understand the full heirarchy, we'll have to beef this up. -->
      <xs:enumeration value="Geography"/>
      <xs:enumeration value="Geometry"/>
      <xs:enumeration value="Guid"/>
      <xs:enumeration value="Single"/>
      <xs:enumeration value="SByte"/>
      <xs:enumeration value="Int16"/>
      <xs:enumeration value="Int32"/>
      <xs:enumeration value="Int64"/>
      <xs:enumeration value="String"/>
    </xs:restriction>
  </xs:simpleType>