Thursday, July 29, 2010

System.MissingMethodException was unhandled

I have been creating a "string array" for use in a BizTalk orchestration. My first version was quick and dirty, and I didn't implement the IEnumerator interface.

Later, I decided to implement IEnumerator (and IEnumerable) so that it would be more recognizable to the next person reading my code. Everything compiled and a test program started, but the above exception was thrown when the client tried to call the Reset() method.

One thing that I didn't realize was related was that the debugger wouldn't step into my code. I saw the message below when I tried to do that:

Microsoft Visual Studio
The following module was built either with optimizations enabled or without debug information:


To debug this module, change its project build configuration to Debug mode. To
suppress this message, disable the 'Warn if no user code on launch' debugger option.

As many people reading this have probably figured out by now, I had an older version of my string array class in the GAC. Oops.

Pulling the assembly out of the GAC solved the first issue, and then I could also run the debugger on the assembly code.

No comments: