> Hi on executing my code I get the following :
An unhandled exception of type 'System.NullReferenceException' occurred in
Unknown Module.
Additional information: Object reference not set to an instance of an
object.
But when I step through thr code on load and dont get this error , any ideas
waht could be casuing this ?
A possible explanation under VS 2003 is that you have run into a bug in the
ide/debugger that I have also seen. When you have a situation that can
reproduce the problem, try running the exe outside the ide/debugger. You may
not be able to reproduce the exception. Go back to the ide/debugger, and the
problem will show up. If all this occurs as I have described, then IMO you
have run into the aforementioned ide/debugger bug.
In all my problems in this area, the 'unknown module' exceptions were rare
and intermittent, so my solution was to ignore them. Do your exceptions
happen rarely? often? always? Also, I have no idea if this problem remains
under VS 2005. Also, I am using FW 1.1, SP1, and since installing SP1, I
don't recall having the problem, although someone else described such a
situation in these newsgroups. Search these newsgroups for "unknown module"
and you will find some interesting reading.