How can I see the strong name of my assembly?

Jeremy Holovacs picture Jeremy Holovacs · Jun 29, 2013 · Viewed 32.7k times · Source

I have a project, and I created a strong name key file for it.

How can I tell what the strong name of my assembly is? It seems this should be obvious, but I can't find any reference to it.

Answer

keyboardP picture keyboardP · Jun 29, 2013

You can use the Strong Name tool to determine if the assembly is strongly named. In command prompt you can do this to verify it is a strong named assembly.

sn -v "C:\MyAssemblyPath"

and to get the public token, you can do this

sn -T "C:\MyAssemblyPath"

You can also use Reflector or ILSpy to find the public key token.

If you want to get the full name of the assembly, including the public token, you can use Assembly.FullName.

Assembly.GetExecutingAssembly().FullName;