Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AssemblyInfo without loading

Is there a way to get the assembly information (name, description, version) programmatically (in C#) without loading the classes into the AppDomain? I just need the information from the manifest and nothing else. Is Assembly.ReflectionOnlyLoad(..) what I need? Or does it load the classes, too?

For Example: I have a dictionary with Files and I want to list the assembly names, descriptions and versions. I don't want to use these Assemblies at this point.

like image 371
mick Avatar asked Feb 10 '23 02:02

mick


1 Answers

You're looking for AssemblyName.GetAssemblyName method which returns an AssemblyName instance. It has Name, Version, PublicKey and some basic information about the assembly.

like image 52
Sriram Sakthivel Avatar answered Feb 13 '23 04:02

Sriram Sakthivel