Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing assembly qualified name?

I would like to parse an assembly qualified name in .NET 3.5. In particular, the assembly itself is not available, it's just the name. I can think of many ways of doing it by hand but I guess I might be missing some feature to do that in the system libraries. Any suggestion?

like image 504
Joannes Vermorel Avatar asked Sep 11 '09 11:09

Joannes Vermorel


People also ask

What is an assembly qualified name?

The assembly-qualified name of a type consists of the type name, including its namespace, followed by a comma, followed by the display name of the assembly. The display name of an assembly is obtained using the Assembly. FullName property.

What is an assembly qualified name is it a filename How is it different?

An assembly qualified name is the internal name of the assembly, combained with the Assebly Version, Culture, and public Key: these cobination make it unique. An assembly's name is stored in metadata and has a significant impact on the assembly's scope and use by an application.


1 Answers

The AssemblyName class can parse the assembly name for you, just pass in the string to its constructor. If you have an assembly qualified type name, I think you'll have to strip of the type part of the string first (ie everything up to the first comma).

like image 95
Mattias S Avatar answered Sep 20 '22 00:09

Mattias S