MissingMethodException

  • Thread starter Thread starter Peter Morris [Droopy eyes software]
  • Start date Start date
P

Peter Morris [Droopy eyes software]

Hi all

AppDomain.CurrentDomain is not implement in .net CF 1.1, so could someone
please tell me how to retrieve a list of assemblies in the current app
domain?

"foreach(Assembly currentAssembly in
AppDomain.CurrentDomain.GetAssemblies());" does not work

Thanks in advance!


--
Pete
====
Audio compression components, DIB graphics controls, FastStrings
http://www.droopyeyes.com

My blog
http://blogs.slcdug.org/petermorris/
 
Sorry this is not possible. What is the end user goal you are trying to
satisfy (so we can potentially offer a workaround)

Cheers
Daniel
 
Hi Daniel, thanks for the fast reply!

I'm trying to create a UI factory class. This scans all loaded assemblies
for classes tagged with certain attributes (UITaskFactory), and then creates
an instance of the class.

The main class factory is called like so

control = (Control) UITaskFactory.Instance.CreateUI(currentTask);

The UITaskFactory goes through its list of IUITaskFactory instances (from
step 1) and asks if it can create UI for the current task, if so then it is
told to do so.

What I am trying to create is
1) A set of Task classes, these identify logic flow + business logic
2) A set of UI factories, one factory may create UI for one or more tasks
3) Display the created UI within a wizard-like form

Pete
 
I've decided only to reflect for factories on demand, rather than
automatically. When using the library in the CF I don't call
FindAllFactories() at all, instead I register them manually.
 
I see... so I presume you can do everything you describe for the main
assembly (the exe) but then can't proceed to do so for any dlls it
references, right?

I cannot see immediately see a clean solution. Are these dlls referenced at
compile time or are you loading them dynamically? If the latter then
obviously you have the names/paths to them already and if the former then
you are going to have to hardcode the names in a collection of some sort or
even read them from a config file (and update it every time you rebuild the
solution).

I see now you have worked around the requirement... cool.

Cheers
Daniel
 
Is there a way to get the "Assembly" object for the current EXE using
reflection?
 
Thanks!

I am considering having my GUI controls in a separate DLL and loading them
at runtime. I will add the DLL to the project anyway, so that it gets
deployed when I run the app. There is no problem with me manually loading a
DLL that is already part of the project is there, just to get a reference to
it?


Pete
 
Back
Top