Tuesday, August 12, 2014

Strange Entity Error

I've been struggling with a strange Entity error in a new project that I've started. Here's the error:

 Method not found: 'System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher
 System.Data.Entity.Infrastructure.Interception.DbDispatchers.get_Connection()'.  

I played with removing items from the context, I removed items from the web.config, all with the same results. I couldn't find anybody that had successfully fixed the error.

On a lark, I removed the Entity Framework package from all projects in my solution and re-added them. Lo and behold, the error went away. I had read somewhere that this error could happen due to different versions of Entity being in the same solution but I had verified that they were all 6.1.1. Something must have become corrupted. Hope this helps someone else in the future.

No comments: