Accessing Members of Dynamically Loaded Assemblies

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I plan to load an assembly during application startup, and load that
assembly via reflection (i.e., it isn't referenced in the application's
assembly manifest). The assembly will be loaded into the application's
default app domain, with code like this:

using System.Reflection;
Assembly loadedAssembly = Assembly.LoadFile(pathToMyAssembly);

My question: When I need to access members of the assembly [loaded via
reflection], how does the application know to get the member from the
dynamically loaded assembly [that is already loaded]? Am I required to get a
runtime reference to that dynamically loaded assembly? and execute GetType()
on that assembly reference?
Or will the Framework attempt to locate the assembly by first looking into
the current app domain before going to the assembly manifest to try to load
the assembly?

I have read up on assembly binding and probing rules and heuristics, but
what I have read assumes that the assembly is listed in the application's
assembly manifest... looks there, then goes through the normal probing
sequence. Is it possible that I've missed something ? and that the "normal
probing sequence" actually starts with the application's default application
domain and uses any loaded assembly before searching the GAC, /bin,
<probing> locations, etc?

Thanks.



.



Relevant Pages

  • Re: XControls: Dynamic loading & polymorphism
    ... samefoo.vi loads the wrapper VI of your choice into a subpanel. ... wrapper VI contains the XControl and outputs a reference to it. ... load foo2, ...
    (comp.lang.labview)
  • Re: Change the name of an component at runtime
    ... compile time are done by reference and would not change. ... negative effect on other forms you might load after that if they refer ... property to lookup pointers and expect to find the named component. ... Why do you need to rename a component at runtime anyways? ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Thread mysteriously terminates.
    ... into the "aggregator" class is throttled to about 1/4 of the load i ... happen on multi-proc HT emabled machines, ... but only has one reference. ... there for some reason. ...
    (microsoft.public.dotnet.framework.performance)
  • Re: No Current Record
    ... If you load the northwind or any other database, ... I did add a reference to his app but that ...
    (comp.databases.ms-access)
  • Referencing Images...
    ... I need to be able to reference some images stored in my VB.NET program. ... I would load the images into an ImageList control and use ... (i.e. in the program I would allows my main database records to 'store' ...
    (microsoft.public.dotnet.languages.vb)