Today I encountered the situation in which one of my assemblies gave the following exception
MissingFieldException was unhandled
An unhandled exception of type 'System.MissingFieldException' occurred in ...
Additional information: Field not found:
Visual studio gave the following hint: if a field in a class library has been removed, recompile any assemblies that reference that library.
After adding a new method to the failing assembly and calling it as expected I got the following exception: An unhandled exception of type 'System.MissingMethodException' occurred in
Somehow Visual Studio did not update the assembly, it may be that Visual Studio did not detect that the assembly changed or the assembly got locked and visual studio couldn’t update the assembly.
The solution was: Removing the assembly from the GAC C:\Windows\Microsoft.NET\assembly\GAC_MSIL