title: Server Error "Method not found: 'Void System.Data.Objects.ObjectContextOptions.set_UseConsistentNullReferenceBehavior(Boolean)'."
body: <p>On a Windows 2008 R2, running on a Virtuozzo Virtual Machine, an ASP.NET MVC 4 web using Entity Framework throws the exception</p>
  
  <pre><code>Method not found: 'Void System.Data.Objects.ObjectContextOptions.set_UseConsistentNullReferenceBehavior(Boolean)'
  </code></pre>
  
  <p>An <em>identical</em> web with the same web.config is running fine on another (root) server with Windows 2012 and of course locally in the development environment. </p>
  
  <p>We are using .NET 4.0. The top of the stack trace is as follows:</p>
  
  <blockquote>
    <p>[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<code>1.GetEnumerator() +28
       System.Collections.Generic.List</code>1..ctor(IEnumerable<code>1 collection) +382
       System.Linq.Enumerable.ToList(IEnumerable</code>1 source) +80
       [...]</p>
  </blockquote>
  
  <p>I did all that's suggestes in  <a href="https://stackoverflow.com/questions/9591929/can-anyone-spot-why-i-keep-getting-this-error-testing-the-ef-5-beta">Can anyone spot why I keep getting this error testing the EF 5 beta</a>. There are no traces of an old EF beta. I re-installed .NET 4.</p>
  
  <p>The error is rare on Google.</p>
  
  <p>What else can I try?</p>