What is an Asssembly Qualified Name

An Assembly Qualified Name (AQN) is a fully qualified name that uniquely identifies an assembly in the .NET Framework. It includes the assembly's display name, version, culture, and public key token (if applicable), providing a complete and unambiguous identifier for the assembly.

Format of an Assembly Qualified Name

The format of an Assembly Qualified Name is typically represented as follows:

<assembly display name>, Version=<version>, Culture=<culture>, PublicKeyToken=<public key token>
  1. The assembly display name specifies the name of the assembly without any version or culture information.
  2. The version represents the version number of the assembly.
  3. The culture denotes the specific culture or language that the assembly supports.
  4. The public key token, if present, is a unique identifier for assemblies signed with a strong name using a cryptographic key pair.
Fully Qualified Assembly Name
mscorelib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

An assembly's name is stored in metadata and has a significant impact on the assembly's scope and use by an application. The display name of an assembly is obtained using the Assembly.FullName property. The runtime uses this information to locate the assembly and differentiate it from other assemblies with the same name.

C# source Code
using System; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Type t = typeof(System.Text.Encoding ); string s = t.Assembly.FullName.ToString(); MessageBox.Show ("Assembly Name" + s.ToString ()); } } }
VB.Net Source Code
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim t As Type = GetType(System.Text.Encoding) Dim s As String = t.Assembly.FullName.ToString() MsgBox("Assembly Name" & s.ToString()) End Sub End Class

You can use the Global Assembly Cache Tool (Gacutil.exe) to view the fully qualified name of an assembly in the global assembly cache.

You can view it through the command prompt, type : gacutil -l

The Assembly Qualified Name is often used in various scenarios, such as specifying assembly references in code, configuration files, or deployment manifests. It ensures the precise identification of assemblies, enabling the runtime to locate and load the correct version of an assembly when it is needed.

Conclusion

By using the Assembly Qualified Name, developers can accurately reference and manage assemblies within their applications, ensuring the appropriate version and culture-specific behavior.