Kae Travis

Getting the Public Key Token of an Assembly using Powershell

This post provides an example of getting the public key token of an assembly using PowerShell.

When I need to add definitions to the web.config of my ASP.Net projects I often use this Powershell line to get the PublicKeyToken, Culture and Version etc.

([system.reflection.assembly]::loadfile("C:\AlkaneSolutions.dll")).FullName

Running this will yield a similar output to the following:

AlkaneSolutions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=aa13051522563c02

Getting the Public Key Token of an Assembly using Powershell
Getting the Public Key Token of an Assembly using Powershell

Leave a Reply