TypeLoadException error in emulator of Pocket 2003se

D

daniel_st.pierre

Hi all,

ok i've developed an application that runs on the windows mobile 2002
and 2003 emulator and device, now i wanted to make it work on the
Windows Mobile 2003se emulator and device and to my surprise my
application is not working like expected and can't find out y

the error i get is:
TypeLoadException: Could not load type
System.windows.Forms.ContainerControl from Assembly
System.Windows.Forms, Version= 1.0.5000.0, Culture=Neutral,
PublicKeyToken=B77A5C561934E089

this happends to any of my smart device applications that i run on the
emulator of the Windows Mobile 2003se SQK

thank for any help provided
 
D

Daniel Moth

Are the CF versions on each device the same?

It sounds like your project (or one of its references) references the
desktop WinForms assembly.

Cheers
Daniel
 
S

Sergey Bogdanov

Have you correctly link your Assembly? The
PublicKeyToken=B77A5C561934E089 is Full Framework System.Windows.Forms
assembly. For Compact Framework you should have:

System.Windows.Forms, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=969db8053d3322ac

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com
 
D

daniel_st.pierre

i create the reference by right clicking on the reference folder in VS
add reference/.NET then i selected System.Windows.Forms which is
located in the following folder
C:\Program Files\Microsoft Visual Studio .NET
2003\CompactFrameworkSDK\v1.0.5000\Windows CE\

one thing i think is that Windows Mobile 2002 and 2003 emulator should
be on the SP1 and i think the windows mobile 2003se emulator is on the
SP2 is this true is so how can i verify this
 
D

dantheman

Yes ther CF versions are the same but maybe the SP is not trying to
figure out how to find that out
 
D

Daniel Moth

Sorry, I don't understand that.

Reason I asked about versions is two-fold:
1. When people complain about something working on one device and not the
other it is worth eliminating version differences.
2. Pre-SP2 releases could hide TypeLoadExceptions

Cheers
Daniel
 
G

Guest

daniel,
PublicKeyToken=B77A5C561934E089 is the key of the full framework version,
the cf has PublicKeyToken=969db8053d3322ac. so, make sure that your
applications are linked against the cf version of all libs.
since cf sp1 the full frame work libs are not retargeted to cf versions.
this was actually only a bug fix, since it worked priorly only when the
corresponding lib was already loaded.
@ndre
 

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