Assembly version from unloaded assembly

  • Thread starter Thread starter bw
  • Start date Start date
B

bw

Hi there

Can anyone tell me how to load information from an
assembly that is not loaded ie: on disk?

Thanks
 
You can get some basic information using

AssemblyName.GetAssemblyName(path);

This has the benefit of loading the assembly into the appdomain, and allows
access to some details of the assembly itself.
 
Oops, I meant to say that it does NOT load the assembly into the appdomain
(that's the side benefit).
 
Once an assembly is loaded into an appdomain you cannot unload it. The only
way to release the assembly library from memory is to close down the entire
appdoamin.

Richard
 
If you use AssemblyName to access the file on disk then it is not loaded
into the appdomain. If you use one of the Assembly.Load or LoadFrom methods
then it is loaded into the appdomain and the only way to unload the assembly
is to unload the entire appdomain.
 
Back
Top