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

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

Open
adrien-constant opened this issue Jun 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@adrien-constant
Copy link

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));

@habbes
Copy link
Contributor

habbes commented Jul 4, 2023

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.

@Algorithman
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants