xmlentity-frameworkvisual-studio-2017edmx

Visual Studio 2017 finds phantom xml errors in edmx file


When I build the Entity Frameworks project in my solution, verbiage in the output window indicates that the build was successful. But if I go look at the error list, I see that this error appears twice:

The 'edmx:Diagrams' start tag on line 6 position 6 does not match the end tag of 'Diagram'. Line 284, position 9.

There are thousands of lines in this edmx file, but here's line 6:

<edmx:StorageModels>

And here's line 284:

<PropertyRef Name="CommunityRegionalCorpId" />

The only "Diagrams" tags in the file are on line 12,273:

<Diagrams></Diagrams>

No edmx:Diagram or edmx:Diagrams tags exist anywhere in the edmx file.

Things I've tried:


UPDATE: this issue has come and gone for no apparent reason over the past few months. As of 3/3/2020, it is gone again.


Solution

  • I just ran into the same issue on VS2019 EF6. After searching and finding no reference to "Diagram" in the edmx file, I looked at the edmx.diagram file. Sure enough I extra tags in the last few lines of the file. I suspect that there was a fault merge somewhere.