Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / April 2006

Tip: Looking for answers? Try searching our database.

TypeLoadException

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tkragelj@gmail.com - 25 Apr 2006 12:28 GMT
Hi

I checked previous posts for this error, but it seems nothing works for
me. When I reference external class library from my application and use
their classes, I get TypeLoad exception when I launch my application
(compiler doesn't complain). If I copy the code to my application,
compile and run, it works. I tested all references assemblies and they
are all of type "Pocket PC 2003 Class library".

This is the message I get:
Could not load type 'System.Collections.Generic.List`1' from assembly
'mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=969DB8053D3322AC'.

What am I missing???

Regars, Tom
<ctacke/> - 25 Apr 2006 13:38 GMT
Use Reflector to check, but I believe that the 969D... public key token is
for CF 1.0, which would explain why it can't find Generics.  Make sure the
project references are all correct.

-Chris

> Hi
>
[quoted text clipped - 13 lines]
>
> Regars, Tom
Alex Feinman [MVP] - 25 Apr 2006 19:26 GMT
Actually, I think this is the desktop version of mscorlib. There must be a
reference somewhere there to a component built for the desktop

> Use Reflector to check, but I believe that the 969D... public key token is
> for CF 1.0, which would explain why it can't find Generics.  Make sure the
[quoted text clipped - 19 lines]
>>
>> Regars, Tom
tkragelj@gmail.com - 26 Apr 2006 07:38 GMT
Original code was made for desktop application, but I copied the
sources to a new Pocket PC 2003 library project and compiled it there.
This works since I don't use functionality not supported in CF. After I
reference this library in my Pocket PC application, compiler is also
happy, but emulator reports an error. I tried to re-create the library
several times, but every time with the same result (I'm sure I use 2.0
version of CF for the library and project).

It looks like the problem is in references, since it works when all
code is copied to the main project, but I can't find what's wrong with
the libraries. Reflector display seems ok to me. The 2.0.0.0 version of
mscorlib has PKT 969db8053d3322ac. I will re-check again, thanks for
suggestions. Anything else to look for?

Tom

Alex Feinman [MVP] je napisal:
> Actually, I think this is the desktop version of mscorlib. There must be a
> reference somewhere there to a component built for the desktop
[quoted text clipped - 4 lines]
> >
> > -Chris
tkragelj@gmail.com - 26 Apr 2006 10:38 GMT
After stripping my application to bare bones, moving all the files from
the libraries to the main application solution and deleting all
references to my libraries, this is what I get when I start the
application:

Could not load type 'System.Xml.XmlElement' from assembly 'System.Xml,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=969DB8053D3322AC'.

I can't even debug. As soon as one line of code that uses the classes
(new statement for example) is included, the application terminates
with the TypeLoadException. This is really weird... And this was
working at one point... At the moment I'm completely lost.

Tom

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.