Type Summary

Type Summary

public class MissingMethodException : MissingMemberException,



    // Constructors

       public MissingMethodException();

 MS CF protected MissingMethodException(SerializationInfo info,

                StreamingContext context);

       public MissingMethodException(string message);

       public MissingMethodException(string message, Exception inner);

 MS CF public MissingMethodException(string className, string methodName);

    // Properties

 MS CF public override string Message { get; }


SC Say you've just installed some assemblies from a third party, and now, during the run of an application using those assemblies, you're seeing a MissingMethodException. The following are the common causes:

Loading failures

First, check for assembly binding failures by getting the Fusion log. Look for the assembly containing the missing method, or assemblies containing types referenced by that method. If an assembly failed to load, use the instructions at the same link to help resolve that issue.

Unexpected assembly version loaded

But, if that's not the problem, turn on the Fusion log for everything—not just failures—and check to see if the wrong version of those assemblies is being loaded. Look at the display names requested. Are any requesting outdated versions, even after policy has been applied (see farther down in the log for the post-policy display name)? If so, you may want to recompile part of your app so that it has current references.

Loaded from unexpected path

If that doesn't help, run filever.exe on the file at the path it was loaded from. You can get that from the loaded modules list in a debugger. It's also the last path listed in the Fusion log, for a successful log (if it's in the GAC, no path is listed). Make sure the path is the same as you would expect.

Method not in this version of the assembly

Next, run ildasm.exe on the file at the path it was loaded from at runtime, and make sure the method is there. Maybe the file has changed, adding or removing methods, but the assembly version and location have stayed the same.

Invalid IL

Now, try running peverify.exe on the file containing the method, using the path it was loaded from at runtime. If it gives an error, check back to see if there was a warning at compile time for this file.

     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows