MissingMethodException for assembly in GAC

  • Thread starter Thread starter Howard Cheng
  • Start date Start date
H

Howard Cheng

Here's my scenario: Two separate VS.NET 2003 solutions, one of which
is a common class library that my company uses is multiple projects
and the other is a client-specific single project solution (n-tier
distributed web application). The class library is compiled and
inserted into the GAC. Projects in the client solution have a
reference to the GAC assembly (with Copy Local set to false). When I
compile the class library, I have pre- and post-build events to
unregister and re-register the DLL from and to the GAC respectively.

Now, here's the problem: I add a new method to the class library and
compile it (unregister and re-register). In the client application, I
instantiate the object and call the method. VS.NET Intellisense knows
that the method is there and the client application compiles just
fine. I can view the referenced DLL in the Object Browser and see the
method. I can view the class library DLL with ILDASM and see it there.
But I get a MissingMethodException at runtime.

What can I do to correct this?

Thanks in advance.
 
Howard,
What can I do to correct this?

Sounds like you end up loading the wrong version of the assembly for
some reason. I'd use Fuslogvw (configured to log successful binds) to
see which copy of the assembly is loaded, or check Assembly.Location
of the Assembly object representing the class lib.



Mattias
 
Back
Top