Assembly version from unloaded assembly

B

bw

Hi there

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

Thanks
 
D

Dave

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

Dave

Oops, I meant to say that it does NOT load the assembly into the appdomain
(that's the side benefit).
 
R

Richard Grimes [MVP]

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
 
D

Dave

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.
 

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

Top