MissingMethodException for assembly in GAC

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.
 
M

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top