IT Community - Software Programming, Web Development and Technical Support

ReflectionTypeLoadException occured while calling Assembly.GetTypes()

This is a discussion on ReflectionTypeLoadException occured while calling Assembly.GetTypes() within the Mobile Software Development forums, part of the Software Development category; I'm writing some tool for analyzing of Compact Framework.NET libraries and for comparing CF with desktop .NET Framework. ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-25-2007, 02:55 AM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Question ReflectionTypeLoadException occured while calling Assembly.GetTypes()

I'm writing some tool for analyzing of Compact Framework.NET libraries and for comparing CF with desktop .NET Framework. But I’ve got this exception while trying to load types from "mscorlib.dll" of CF. I have searched through similar questions (about ReflectionTypeLoadException), but all links bring me to answers like "assembly you're trying to reflect to get types references types defined in the assembly". But "mscorlib" does not reference other assemblies!
Loader exceptions contained in ReflectionTypeLoadException include 57 (!) exceptions of 3 types: "Bad use of Runtime Impl attribute.", "Could not load type ... due to value type mismatch." and "Could not load type ... because the format is invalid." (All are TypeLoadException's). How could I pass through that?
Advice me, please! P.S. For loading CF's "mscorlib.dll" I use Assembly.ReflectionOnlyLoadFrom(string path) method, because others like Load or LoadFrom are not working for it. P.P.S. All types from other libraries of CF set are loaded well
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-25-2007, 02:56 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ReflectionTypeLoadException occured while calling Assembly.GetTypes()

Loading .NETCF libraries via desktop reflection is an unsupported scenario. The desktop runtime gets very confused when you do this. .NETCF itself does support reflection (most of it, anyway). In order to reflect over the .NETCF libraries, you will need to do it from within a .NETCF compiled application.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling exe bluesky Database Support 6 08-09-2007 05:41 AM
What is meant by Satellite assembly in Asp.Net ? mobilegeek ASP and ASP.NET Programming 3 08-08-2007 02:18 AM
Whats an assembly? prasath ASP and ASP.NET Programming 1 07-19-2007 02:20 AM
Calling WinRunner Functions in QTP senthilkannan Testing Tools 0 07-19-2007 01:14 AM
Calling SOAP web service in VB6.0 Karpagarajan VB.NET Programming 0 03-21-2007 07:01 AM


All times are GMT -7. The time now is 10:32 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0