Fix: The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced.

I got this message in a class that inherits from  DbContext.  It made no sense, because System.Data.Entity was definitely referenced in my ASP.NET project.

The fix was to select the reference in the properties page and change Copy Local to True.

Computers!

Published Tuesday, June 4, 2013 8:05 PM by Ken Cox [MVP]

Comments

# re: Fix: The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced.

Monday, June 17, 2013 3:49 AM by Mark

Sorry but it make sens - you run it on computer without entity framework installed and you thought that it will work? :)

Leave a Comment

(required) 
(required) 
(optional)
(required)