Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ErikEJ opened this issue Mar 22, 2023 · 1 comment

Comments

@ErikEJ
Copy link

ErikEJ commented Mar 22, 2023

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
Copy link
Author

ErikEJ commented Mar 22, 2023

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant