Friday, May 18, 2012

C# MissingMethodException at runtime but compiles fine

Problem:

I got this MissingMethodException when I ran the code even though it compiled fine in Visual Studio.  I browsed the assembly referenced from the project, and the method that I wanted to call was there.  I was puzzled.  Since I'm new to .NET and don't know too much about it, it frustrated me for a bit on why that was happening.

Solution:

Well, it turned out that I had the same dll in GAC.  When I updated the dll in GAC, it ran fine.

No comments:

Post a Comment