On a Windows 2008 R2, running on a Virtuozzo Virtual Machine, an ASP.NET MVC 4 web using Entity Framework throws the exception
Method not found: 'Void System.Data.Objects.ObjectContextOptions.set_UseConsistentNullReferenceBehavior(Boolean)'
An identical web with the same web.config is running fine on another (root) server with Windows 2012 and of course locally in the development environment.
We are using .NET 4.0. The top of the stack trace is as follows:
[MissingMethodException: Method not found: 'Void System.Data.Objects.ObjectContextOptions.set_UseConsistentNullReferenceBehavior(Boolean)'.] System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +0 System.Data.Entity.Internal.InternalContext.ExecuteSqlQuery(String sql, Object[] parameters) +34 System.Data.Entity.Internal.InternalContext.ExecuteSqlQueryAsIEnumerable(String sql, Object[] parameters) +91 System.Data.Entity.Internal.InternalContext.ExecuteSqlQuery(Type elementType, String sql, Object[] parameters) +250 System.Data.Entity.Internal.InternalSqlNonSetQuery.GetEnumerator() +34 System.Data.Entity.Internal.InternalSqlQuery
1.GetEnumerator() +28 System.Collections.Generic.List
1..ctor(IEnumerable1 collection) +382 System.Linq.Enumerable.ToList(IEnumerable
1 source) +80 [...]
I did all that's suggestes in Can anyone spot why I keep getting this error testing the EF 5 beta. There are no traces of an old EF beta. I re-installed .NET 4.
The error is rare on Google.
What else can I try?