TypeLoadException - VS.NET Problem??

G

Guest

We have been getting TypeLoadExceptions under the Compact Framework Service Pack 2. Before, when we got one of these, we didn't think too much of it - we reinstalled from a CAB file, and it all worked. We blamed a corrupt DLL or something.

But now it has returned. When I deploy my project through VS.NET 2003 (Pro), onto one of these Panasonics, we get a TypeLoadException thrown. This occurs before the Sub Main is called, so it does not break into the debugger.

At first, it was being thrown in FieldSoftware.PrinterCE, but, having removed all references to that from the project, it is being thrown in System.Drawing.Icon

It appears that if I install from a CAB file (built with VS's BuildCab.BAT) then it works perfectly, but deploying through the debugger, to a freshly hardware-reset Panasonic or emulator - it crashes.

Some details:
the original exception -
Could not Load type
FieldSoftware.PrinterCE_NetCF.PrinterCE from assembly PrinterCE.NetCF, Version 1.0.4.0, Culture=neutral, PublicKeyToken=null.

the new exception -
Could not load type System.Drawing.Icon from assembly System.Drawing, Version 1.0.5000.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC.

both the emulator and the panasonics are running PPC2002, with SP2. VS.NET is version 7.1.3088, running on a Win2000 PC, ActiveSync 3.7.1

I am open to all ideas...including voodoo dances at the moment.
email - lawrence at telecetera . co . uk
 
G

Guest

Lawrence

Did you manage to get around this? I am contnually have the same problem, I have tried re-booting. re-installing, reseting and sometimes I get a few more cracksat debugging before it comes back again. My symptoms are the same as yours.

If my first line in the load form sub is a string assinment I get

An unhandled exception of type 'System.TypeLoadException' occurred in System.Windows.Forms.dl

Additional information: Could not load type Microsoft.VisualBasic.CompilerServices.StringType from assembly Microsoft.VisualBasic, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A

But if the first line in my load form sub is a message box I get

An unhandled exception of type 'System.TypeLoadException' occurred in System.Windows.Forms.dl

Additional information: Could not load type Microsoft.VisualBasic.MsgBoxResult from assembly Microsoft.VisualBasic, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A

I am debuggin on a Ipaq h5550 running Pocket PC 2003

Any suggestions would be grately appreciated

Cheers
Thoma
 
G

Guest

I didn't manage to find out what was causing it, no. However, i did manage to get past it. I had ordered my project into directories - different directories for class libraries, forms, icons/pictures etc. I got rid of those and it seemed to work. However, I don't think this is the problem.

I had some correspondance with microsoft, but that didn't get anywhere. If you give me your email address i'll forward them to you, i'd like to see this get solved.
 
G

Guest

I have a similar problem with a smart win application CF (.exe) that use a private assembly; my private assmbly was compiled with auto-generation of version number (ex: 1.1.*); when I change source code of p.a. and I rebuild it
- if new version of p.a. has the same major.minor.revision (only build number change) then smart app run fine
- if new version of p.a. has different major.minor.revision then smart app fail and throw an TypeLoadException

The same scenario on Full .NET Framework run fine
Is this a CF problem or bug

thank to all
Albert
 
R

Robert Hanson

Hello Lawrence,

Did you determine the problem with this? I found this problem yesterday
and by commenting out two lines that are instantiating a class object
found in a different project under the same solution, I was able get
stop the error but of course this is a problem to go further in the
solution development.

Best Regards,

Bob Hanson
Centare Group Ltd.
 

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