ODataConnectedService icon indicating copy to clipboard operation
ODataConnectedService copied to clipboard

CreateXmlReader() raises exception when multiple ressources have the same ending names

Open adrien-constant opened this issue 2 years ago • 2 comments
trafficstars

Describe the bug

With two services:

  • MyService
  • AnotherMyService

Creating an instance of MyService will faill because there are two XML metadata files in the assembly ending with MyServiceCsdl.xml

Version of the Project affected

ODataConnectedService all versions

Additional context

To fix quickly, simply replace this line var resourcePath = global::System.Linq.Enumerable.Single(assembly.GetManifestResourceNames(), str => str.EndsWith(filePath));

with var resourcePath = global::System.Linq.Enumerable.Single(assembly.GetManifestResourceNames(), str => "." + str.EndsWith(filePath));

adrien-constant avatar Jun 07 '23 10:06 adrien-constant

Hi @adrien-constant thanks for pointing this out. Would you be willing to contribute a PR that fixes this issue. We'd be happy to review it.

habbes avatar Jul 04 '23 16:07 habbes

over 1 year old now, just fix it already please.

Algorithman avatar Jul 25 '24 09:07 Algorithman