PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Strange MissingMethodException

Reply

Strange MissingMethodException

 
Thread Tools Rate Thread
Old 03-08-2005, 10:41 AM   #1
=?Utf-8?B?SWFu?=
Guest
 
Posts: n/a
Default Strange MissingMethodException


I have written a class library (for encryption) which is intended to be used
by compact, desktop, and web service applications - all in C#.

One of the classes in the class library has two public static methods;
Decrypt and DecryptXml. DecryptXml calls Decrypt.

This class library is added as a reference in the CE application, which then
calls the DecryptXml method. However, at the point that this method calls
Decrypt, a MissingMethodException is thrown. Even though the two methods are
in the same class. If i change the CE app to call Decrypt directly, the
exception is thrown in the CE app at this point. I can navigate from the
call in the CE app to the method definition in the class library using
right-click and Go To... (they're in the same solution at the moment), and
everything compiles.

The problem does not occur when calling either method from the Desktop app.

So in summary: Calling the Decrypt method throws a missing method exception,
even when called from within it's own class, but only running under the CE
App.

Anyone seen this before, or have any suggestion?

Thanks.
  Reply With Quote
Old 03-08-2005, 11:30 AM   #2
Daniel Moth
Guest
 
Posts: n/a
Default Re: Strange MissingMethodException

What target are you using to test this and does it have the latest service
pack?

Note that if you have a dll to be used on both platforms it needs to be
built against the CF.

Can you step into the code and see exactly where the exception occurs? Have
you looked at the IL (ildasm or reflector) to see what gets compiled?
Overall, I think you should post a small repro so we can have a look at it.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

"Ian" <Ian@discussions.microsoft.com> wrote in message
news:F3735170-A172-425C-9A59-A28012FB4F8E@microsoft.com...
>I have written a class library (for encryption) which is intended to be
>used
> by compact, desktop, and web service applications - all in C#.
>
> One of the classes in the class library has two public static methods;
> Decrypt and DecryptXml. DecryptXml calls Decrypt.
>
> This class library is added as a reference in the CE application, which
> then
> calls the DecryptXml method. However, at the point that this method calls
> Decrypt, a MissingMethodException is thrown. Even though the two methods
> are
> in the same class. If i change the CE app to call Decrypt directly, the
> exception is thrown in the CE app at this point. I can navigate from the
> call in the CE app to the method definition in the class library using
> right-click and Go To... (they're in the same solution at the moment), and
> everything compiles.
>
> The problem does not occur when calling either method from the Desktop
> app.
>
> So in summary: Calling the Decrypt method throws a missing method
> exception,
> even when called from within it's own class, but only running under the CE
> App.
>
> Anyone seen this before, or have any suggestion?
>
> Thanks.



  Reply With Quote
Old 04-08-2005, 10:33 AM   #3
=?Utf-8?B?SWFu?=
Guest
 
Posts: n/a
Default Re: Strange MissingMethodException

Daniel,

Thanks. I basically had forgotten to build it under a compact framwork
class library. I'm now not getting MissingMethodExceptions, but quite a few
'not supported' problems to work on.



"Daniel Moth" wrote:

> What target are you using to test this and does it have the latest service
> pack?
>
> Note that if you have a dll to be used on both platforms it needs to be
> built against the CF.
>
> Can you step into the code and see exactly where the exception occurs? Have
> you looked at the IL (ildasm or reflector) to see what gets compiled?
> Overall, I think you should post a small repro so we can have a look at it.
>
> Cheers
> Daniel
> --
> http://www.danielmoth.com/Blog/
>
> "Ian" <Ian@discussions.microsoft.com> wrote in message
> news:F3735170-A172-425C-9A59-A28012FB4F8E@microsoft.com...
> >I have written a class library (for encryption) which is intended to be
> >used
> > by compact, desktop, and web service applications - all in C#.
> >
> > One of the classes in the class library has two public static methods;
> > Decrypt and DecryptXml. DecryptXml calls Decrypt.
> >
> > This class library is added as a reference in the CE application, which
> > then
> > calls the DecryptXml method. However, at the point that this method calls
> > Decrypt, a MissingMethodException is thrown. Even though the two methods
> > are
> > in the same class. If i change the CE app to call Decrypt directly, the
> > exception is thrown in the CE app at this point. I can navigate from the
> > call in the CE app to the method definition in the class library using
> > right-click and Go To... (they're in the same solution at the moment), and
> > everything compiles.
> >
> > The problem does not occur when calling either method from the Desktop
> > app.
> >
> > So in summary: Calling the Decrypt method throws a missing method
> > exception,
> > even when called from within it's own class, but only running under the CE
> > App.
> >
> > Anyone seen this before, or have any suggestion?
> >
> > Thanks.

>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off