Export (0) Print
Expand All

AssemblyName.FullName Property

Gets the full name of the assembly, also known as the display name.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

Public ReadOnly Property FullName As String

Property Value

Type: System.String
A string that is the full name (display name) of the assembly.

The display name typically consists of the simple name, version number, supported culture, and public key token. For example:

mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840

We do not recommend writing your own code to parse display names. Instead, pass the display name to the AssemblyName(String) constructor, which parses it and populates the appropriate fields of the new AssemblyName.

When an assembly is loaded, this value can also be obtained by using the Assembly.FullName property.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

 Instead of an empty string, this member returns System.Reflection.AssemblyName if the AssemblyName object was instantiated with the default constructor. Silverlight for Windows Phone does not return PublicKeyToken information by default. You must use individual methods to compare the culture, version, and PKT information.

The following example gets the full name of a .NET Framework assembly, parses it by using the AssemblyName(String) constructor, and uses the properties and methods of AssemblyName to display the individual parts. Finally, the FullName property is displayed.

Imports System.Reflection

Public Class Example
   Private Const mask As Byte = 15

   Public Shared Sub Demo(ByVal outputBlock As System.Windows.Controls.TextBlock)

      ' Use AssemblyName to parse full assembly names. In this example, the 
      ' assembly is mscorlib.dll.
      Dim name As String = GetType(String).Assembly.FullName
      Dim asmName As New AssemblyName(name) 

      outputBlock.Text &= String.Format("Name: {0}" & vbLf, asmName.Name)

      outputBlock.Text &= String.Format("Version: {0}" & vbLf, asmName.Version)

      outputBlock.Text &= String.Format("CultureInfo: {0}" & vbLf, asmName.CultureInfo)

      Dim pkt As New System.Text.StringBuilder()
      For Each b As Byte In asmName.GetPublicKeyToken()
          pkt.Append(Hex(b \ 16 And mask) & Hex(b And mask))
      Next b
      outputBlock.Text &= String.Format("PublicKeyToken: {0}" & vbLf, pkt.ToString())

      outputBlock.Text &= String.Format("FullName: {0}" & vbLf, asmName.FullName)

   End Sub

End Class

' This example produces output similar to the following:
'Name: mscorlib
'PublicKeyToken: 7CEC85D7BEA7798E
'FullName: mscorlib, Version=, Culture=neutral, PublicKeyToken=7cec85d7bea7798e


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2014 Microsoft