Retrieve all loaded assemblies

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Hi everyone

Does anyone have any idea how you can get a list of all the loaded
assemblies on the compact framework?
What I need to do is resolve the type of something by its name. I have the
namespace and the type name I just then need to get a type instance from
that name e.g. the function receives system.windows.forms and form, I then
need to get a system.type from these.

I know how do it in the full framework just stumped for the CF.

Any help would be much appreciated.

Thanks in advance
Dan
 
I am not sure what you're trying to do but Assembly.CreateInstance and
Assemby.Load are still there.
 
Hi Alex
Really all I wanted was to find the compact framework equivalent of
appdomain.currentdomain.getassemblies if possible, I know that the CF
doesn't use appdomains like the full framework so i aren't sure if it is
possible.

Cheers
Dan
 
As you note the method appdomain.currentdomain.getassemblies is missing and
there is no way to directly get this information on the CF. Maybe if you
describe your end user requirement someone can come up with a workaround.

Cheers
Daniel
 
Hi Daniel

Im just porting some code over from the full framework to the compact
framework, and there is a piece of code that returns a system.type from two
strings the namespace and the class name. It first gets an instance of the
namespace assembly so for example if the namespace was System.Windows.Forms
it would look through the loaded assemblies for it rather than just being
forced to load it straight away which is what I have resorted to. It then
just calls the get type method with the namespace and class name
concatanated and returns the type.

I have got it working but I am actually loading the assemblies, I then store
these assembly instances in a hastable so that I don't need to reload them.
This may turn out to be the best/only way. But I thought I would ask.

Cheers
Dan
 
Back
Top