System.MissingMethodException: Method not found?

⚠️ Wrong Nuget Package Version ⚠️

I had a unit test project which was pulling in our companies internal EF Nuget data access package and that code pulled in an external package whose version was way behind the current version.

The issue was that the Nuget settings for the top level package was set to the least version; and the lower level/older version won, and that was used during the operations....

Hence it silently got the wrong version for a common assembly used by both the package and the app.


💡 Solution 💡

By Setting/updating the package in Nuget to use and [get] the latest, fixed the issue.


This is a problem which can occur when there is an old version of a DLL still lingering somewhere around. Make sure that the latest assemblies are deployed and no duplicated older assemblies are hiding in certain folders. Your best bet would be to delete every built item and rebuild/redeploy the entire solution.


I resolved this issue by installing the correct .NET Framework version on the server. The website was running under version 4.0 and the assembly it was calling to was compiled for 4.5. After installation of .NET Framework 4.5 and upgrading the website to 4.5, all works fine.