'MissingMethodException when migrating from Ef 6.2 to 6.4.4
For a .net framework 4.8 project, when I update the EF reference from 6.2 to 6.4.4 the application throw an error
System.MissingMethodException: Unable find 'Void System.Data.Entity.Infrastructure.LocalDbConnectionFactory..ctor()'.
in
public class AppContext : DbContext
  {
    public AppContext() : base() <--- the debugger stop on this line
Web.config have these lines
  <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
.......
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="mssqllocaldb"/>
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
    </providers>
  </entityFramework>
No changes has been made in code or in config file, only a package update via Package Manager.
What's that?
Solution 1:[1]
In my case the Global Cache was broken in some mode.
gacutil -u EntityFramework
solved my problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|---|
| Solution 1 | Longa | 
