Home > Asp.net MVC, Entity Framework > ‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced

‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced

I start a pet project using MVC3 +entity framework. When I query the entity I got the following errors.

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, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′

I double checked my references in my project; System.Data.Entity is in my project references. After a bit Goggling, to solve this problem you need to add the assembly reference in the web.config. See the screen shot below:


 

    

About these ads
  1. Rajan
    December 12, 2011 at 7:33 pm | #1

    Helpfull post

  2. May 27, 2012 at 6:07 am | #2

    thanks dev,

    this really helps

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 143 other followers

%d bloggers like this: