Unchase.Odata.Connectedservice icon indicating copy to clipboard operation
Unchase.Odata.Connectedservice copied to clipboard

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

Open dixonte opened this issue 3 years ago • 1 comments

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 avatar Sep 12 '22 04:09 dixonte

Just encountered the same exact problem!

dazinator avatar Jan 11 '23 17:01 dazinator