Getting assembly version without loading it

N

nano2k

Hi

I need to get the version of an assembly without having to load it
neither using Assembly class's Load methods, nor by using new
appdomains.
It's quite complicated for me to explain exactly why. Manly is because
I don't the loaded assembly to remain loaded (because no
Assembly.Unload() method exists). Second, I can't manage to load it
using appdomains because i don't have all the dependencies of the
assembly. That is, this assembly depends on 10 other aseemblies, but i
only have the main assembly.

Maybe a shell command exists?
Thanks
 
M

Mattias Sjögren

I need to get the version of an assembly without having to load it
neither using Assembly class's Load methods, nor by using new
appdomains.

You can use the AssemblyName class and its GetAssemblyName method.


Mattias
 
G

GlennDoten

Mattias said:
You can use the AssemblyName class and its GetAssemblyName method.


Mattias

You could look at the assembly file with ildasm.exe and get the version
from there.
 

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