New Posts New Posts RSS Feed: Error during Object Mapper code gen when moving entity from one model to another
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error during Object Mapper code gen when moving entity from one model to another

 Post Reply Post Reply
Author
pk55 View Drop Down
Senior Member
Senior Member


Joined: 22-Jul-2009
Location: CA
Posts: 105
Post Options Post Options   Quote pk55 Quote  Post ReplyReply Direct Link To This Post Topic: Error during Object Mapper code gen when moving entity from one model to another
    Posted: 20-Oct-2009 at 2:28pm
I had multiple data models for a domain model.  I had an entity defined in one model and needed to move it to another model for a different database.  I removed the entity definitions from the EDMX and then added them to the other EDMX.  When the object mapper runs it throws an error and stops generation:
 
Error during code generation: Index was outside the bounds of the array.
 
Now when I open the object mapper and click on the model that had the entity added to it, it crashes visual studio.
 
Any thoughts on how to recover from this?
Back to Top
pk55 View Drop Down
Senior Member
Senior Member


Joined: 22-Jul-2009
Location: CA
Posts: 105
Post Options Post Options   Quote pk55 Quote  Post ReplyReply Direct Link To This Post Posted: 20-Oct-2009 at 2:50pm
It turns out the error wasn't related to moving the entity.  It was from the IdeaBlade Injected Base types that is stored on the EDMX in the CSDL.  It had an extra semi-colon between types.  I was editing it by hand and removed a type from this model but missed the separator semi-colon.
 
In the future, it would be nice if the error message had at least said something less generic and more info relating to the actual problem.
 
 
 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 20-Oct-2009 at 5:07pm
We'll see what we can do with better detection when an EDMX contains errors and fails to load, and try to provide better diagnostics.  Thanks for bringing this to our attention!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down