ASP.NET+MVC+Entity Framework Error – CS0012: The type ‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced. You must add a reference to assembly System.Data.Entity

I created a blank MVC4 site in which I tried consuming a WCF. Data was returned from WCF and available in MVC controller but when I was trying to use the data in MVC View using model; I was left to struggle with this error. I included following code in web.config to fix this and it worked-

<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
This entry was posted in Entity Framework, Knowledge Sharing, MVC, Troubleshooting. Bookmark the permalink.

Leave a Reply