When debugging through a .NET 3.5 SP1 project that communicates with a local web service, I get an exception
System.BadImageFormatException: "Bad class token"
Of course, there is not much detail about what causes the exception.
I can say that the method where this happens, which is in the same class as the caller, does not reach the debugger. This exception occurs when a method is called that communicates with the web service. I have other ways to communicate with the web service, so the link is good.
My unit tests for a method also fail with the same exception.
Correction : my unit tests for the method are successful, which leads to confusion.
Does anyone know a way to track this exception? I read the documentation for the exception class, which leads me to believe that one of the assemblies is incorrect in its version or a problem with the assembly.
What other steps would you suggest when resolving this exception?
source
share