OData / lab

This repository is for exploring new ideas and developing early prototypes of various OData stacks.
Other
48 stars 59 forks source link

Generated code does not compile when configuring an OdataConnectedService #80

Closed raz-sinay closed 4 years ago

raz-sinay commented 6 years ago

When createing an OdataConnectedService using the extension (from visual studio 2017 enterprise marketplace), the generated code does not compile and outputs the error :

Error CS0234 The type or namespace name 'EdmxReader' does not exist in the namespace 'Microsoft.OData.Edm.Csdl' (are you missing an assembly reference?)

Problematic code :

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")] private static global::Microsoft.OData.Edm.IEdmModel LoadModelFromString() { global::System.Xml.XmlReader reader = CreateXmlReader(Edmx); try { return global::Microsoft.OData.Edm.Csdl.EdmxReader.Parse(reader); } finally { ((global::System.IDisposable)(reader)).Dispose(); } }

The type EdmxReader should be replaced with CsdlReader as referenced in issue#632

unchase commented 5 years ago

You can try Unchase OData ConnectedService for checking this issue.

habbes commented 4 years ago

Hi @raz-sinay The latest release of OData Connected Service on VS Marketplace fixes this issue: https://marketplace.visualstudio.com/items?itemName=laylaliu.ODataConnectedService