MissingMethodException when code called from dll

J

Jim H

I have a project that uses a library of .NET classes that run on XP and PPC.
The solution builds fine. When I go to execute the program I get a
MissingMethodException and the program stops at Application.Run(). I can't
get any breakpoints to stop execution before this point. I have a reference
to the library project in my PPC application project.

If I remove the reference and copy ALL of the files from that library to the
PPC project the program builds and executes fine. Why is this? It does use
other libraries I've created and included just not this one. I'd like to
code to remain in a dll because I plan on reusing many of these objects in
other projects.

I'm confused.

Thanks,
jim
 
A

Alex Feinman [MVP]

If you want to share a library between the desktop and the device projects,
it must be built as the device class library project. Only device projects
can run on the desktop, but not the other way around
 
J

Jim H

Thanks for the reply.

Why do my other libraries work? Is it just luck that there were no desktop
specific calls in their code?

How do I change the current project to be a device class library? Is that a
project setting somewhere or do I have to create a whole new project?

Thanks,
jim
 
N

Neil Cowburn

You will have to create a new project and add the existing code files to it.

HTH
Neil
 

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