How to find the Version, Culture and PublicKeyToken of an Assembly (DLL) using PowerShell

In response to a question on my article How to install a DLL to the GAC on Windows Server 2012 using only PowerShell (without having to install SDK or Visual Studio) here’s how you can find the PublicKeyToken for a DLL using only PowerShell.

([system.reflection.assembly]::loadfile("c:\temp\MyDLL.dll")).FullName

The output of this PowerShell statement will provide the Version, Culture and PublicKeyToken as shown below.
MyDLL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=630d986a50055aa6

6 thoughts on “How to find the Version, Culture and PublicKeyToken of an Assembly (DLL) using PowerShell

Add yours

    1. What details do you have to identify the DLL or are you looking for a dump of all DLLs? There are usually quite a few DLL’s in the GAC and you also have separate 32 and 64 bit areas of the GAC.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: