System.MissingMethodException is driving me crazy

S

sjenkinson

Hi

I have a VB.NET Pocket PC application that I am developing, and have
been encountering this error inconsistently. The solution compiles yet
when I try to run (via debugging on the device), sometimes I can step
into the method LoadForm, but most of the time it comes up with the
exception System.MissingMethodException


Public Sub New()
MyBase.New()
InitializeComponent()
LoadForm()
End Sub

Public Sub LoadForm()

'My form loading code in here

End Sub


This is driving me crazy, I have spent hours trawling through the net
trying to find a solution, but nothing works consistently. Sometimes
if I rename the method LoadForm then it will run a few times but then
once it encounters an exception once, it will not run again. If anyone
has any advice or solution, it would be hugely appreciated.
 
G

Guest

You're not giving us enough to go on. What happens in InitializeComponent?
What happens in LoadForm?

-Chris
 
S

sjenkinson

InitializeComponent runs through the initializing of the form elements,
there is far too many to post here. But it runs fine to completion, it
throws this exception when LoadForm is called,and never actually gets
into the LoadForm method. The purpose of this method is to extract
data from the database and populate to the form, I thought the contents
were irrelevant as it only sometimes goes in there, and when it does it
runs through the method fine anyway.
 
D

Daniel Moth

How large is LoadFrom? Are you running this on a device or in the emulator?

Cheers
Daniel
 
N

Nick Randolph

There are a number of things that can cause this exception to be thrown and
the information provided is not enough for any of us to accurately debug
your issue specifically. One scenario that does cause this exception when
I'm doing dev is when I toggle between doing desktop and pocket pc
development. Because around 50% of our application is shared between
desktop and pocket pc app we need to ensure that when toggling we do an
entire rebuild. If we don't it attempts to deploy desktop dlls to the
pocket pc (and vice versa). Again, this is only one scenario of many and
may not be at all related to what you are doing.

Nick
 

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