Join Us!

Spaces are allowed; punctuation is not allowed except for periods, hyphens, and underscores.
A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Login

Enter your Project Envision username.
Enter the password that accompanies your username.
Request new password

CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced

When you work on development with Entity Framework you can see below error.

CS0012: The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not referenced.

The first step is to add a References to System.Data.Entity under References in Visual Studio. Right click References folder and choose Add Reference, from the list you have to choose following assembly:

System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

However sometimes it is not enough and you have to modify your Web.config file.

The solution is to add below line to Web.config file

<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

Here is example of complete <system.web> section from Web.config, it is taken from ASP.NET MVC 3 application so you will need to modify it according to your needs:

<system.web> 
<compilation debug="true" targetFramework="4.0">
 <assemblies> 
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
 <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> 
<authentication mode="Forms"> 
<forms loginUrl="~/Account/LogOn" timeout="2880" /> 
</authentication> 
<pages> 
<namespaces> 
<add namespace="System.Web.Helpers" /> 
<add namespace="System.Web.Mvc" /> 
<add namespace="System.Web.Mvc.Ajax" /> 
<add namespace="System.Web.Mvc.Html" /> 
<add namespace="System.Web.Routing" /> 
<add namespace="System.Web.WebPages"/> 
</namespaces> 
</pages> 
</system.web>