Search code examples
visual-studio-2013odata

The custom tool 'DataServicesCoreClientGenerator' failed. ... error 0005: The 'OpenType' attribute is not allowed


When I add a service reference in Visual Studio 2013 Community Edition to a OData service for code generation, I get a schema error; error 0005 Open Type attribute is not supported. See images below.

The service is a OData v3-service. I'm using a Windows Forms project, .NET 4.5.1.

Does anybody know what's the problem?

The service I'm trying to add

The exact error message


Solution

  • I took look at the service $metadata. It seems that the namespace of the csdl is of version 1 which is "http://schemas.microsoft.com/ado/2006/04/edm"

    <Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm" Namespace="Cbs.OData">

    But OpenType is not supported in version 1. if you changed it to version 3 http://schemas.microsoft.com/ado/2009/11/edm, the client proxy code will be successfully generated.

    So you should check your service to make sure your secsdl version is version 3.