Botz3000
Botz3000

Reputation: 39610

Entity Model does not load

Whenever i try to open my Entity Model, i get a not very helpful error message stating that "the operation could not be completed". So unfortunately i don't have more specific information. However, i have other models that open just fine, and i didn't make any significant changes to the model, other than renaming entities.

Are there any known workarounds for this behaviour? I restarted VS and my PC, removed and added the model again but nothing helped, so it must be something in the .edmx, i guess. But i didn't modify it by hand and everything compiles without errors or warnings. :-/

Upvotes: 1

Views: 1306

Answers (4)

Alejandro del Río
Alejandro del Río

Reputation: 4046

I had the exactly same problem. I solved it by copying the project content to another folder. When I reopened the project, the problem was gone. I didn't copied the .suo file. I think the problem came up with some unnespected power outage in my work.

Upvotes: 0

Botz3000
Botz3000

Reputation: 39610

I guess i fixed it...

I was using inheritance, which can cause errors if you have a 0..1|... association on a derived entity. The fix for it is usually to set the association to a 1|... association, then do the inheritance, then change it back.

However in my case that somehow broke it, but then i left the associations at 0..1|... first, then applied inheritance and after getting the error set it to 1|... , saved and then set it back again. Now it works. :)

I really can't wait for the next EF :-/

UPDATE:

I had the error again, this time i fixed it by opening the .edmx file and removing duplicate InheritanceConnectors in the EF Designer section.

Upvotes: 1

Robert Koritnik
Robert Koritnik

Reputation: 105029

Now that is strange. If you haven't manipulated EDMX file by hand (nor did anyone else) then it must be EFDesigner. Everybody knows its more in pre beta version than anything serious. Have you tried part by part changes?

Upvotes: 0

Miha Markic
Miha Markic

Reputation: 3240

Here is what I'd do. I would cut pieces of data from edmx (or whatever file is the source) file to see when the designer starts loading it again. This way I'd pinpoint the problem.

Upvotes: 0

Related Questions