MissingMethodException

  • Thread starter Peter Morris [Droopy eyes software]
  • 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/
 
D

Daniel Moth

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
 
P

Peter Morris [Droopy eyes software]

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
 
P

Peter Morris [Droopy eyes software]

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.
 
D

Daniel Moth

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
 
P

Peter Morris [Droopy eyes software]

Is there a way to get the "Assembly" object for the current EXE using
reflection?
 
P

Peter Morris [Droopy eyes software]

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
 

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

Similar Threads

MissingMethodException 6
Believe it or not, Fortran 19
Thrash my site 2
Serving pages which do not exist 5
Google search 2
ASP.NET training in the UK 3
Menu items keep disappearing 1
ShowDialog() 4

Top