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

Edmx with whitespace in property names causes generation of invalid C# code #86

Open
dixonte opened this issue Sep 12, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@dixonte
Copy link

dixonte commented Sep 12, 2022

Describe the bug

I'm trying to import the latest Dynamics F&O OData metadata from our production environment. Unfortunately it seems that a bunch of navigation properties and other elements have spaces in the name. This causes generation of C# code that will not compile.

Assemblies affected

This is affecting version 1.5.1 in VS2022, so assembly Unchase.OData.ConnectedService.VS22.

Steps to reproduce

  1. Create a new C# assembly in VS2022.
  2. Create a connection using the attached emdx file d365meta.zip
  3. Attempt to compile the resulting code.

Expected result

The generated code should compile.

Actual result

The generated code does not compile, due to many examples of members with spaces in the name.

Screenshots

image

Additional detail

I've been looking at seeing if I could fix this myself. If I can figure out a nice solution I might make a pull request, but I'm not really familiar with VS add-in programming or OData metadata.

@dixonte dixonte added the bug Something isn't working label Sep 12, 2022
dixonte added a commit to dixonte/Unchase.Odata.Connectedservice that referenced this issue Sep 15, 2022
Added new GetFixedNamePart that just does the whitespace replacement, using this for private members
@dazinator
Copy link

Just encountered the same exact problem!

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

2 participants