Powershell quickie: .NET Framework version of a .dll

When finding a random .dll from a vendor or a pre-existing project it can be nice to know its .NET Framework version of ahead of time before spending some precious minutes wondering why it’s not showing up in the references panel after importing it in your project.

There are a dozen of C# decompilers and debuggers you can install to do this but here is a quicker method to do that without installing any dubious third party software on your Windows system. This simple powershell one-liner will give you the proper .NET Framework version of your .dll:

[Reflection.Assembly]::ReflectiononlyLoadFrom(".\your_dll.dll").ImageRuntimeVersion

It should return a readable version number:

Output of the powershell command

It’s simple but not very memorable. At least now I know why this dll wouldn’t show up as a reference on my Unity3D project.

Credit goes to that guy on Stack Overflow.



Enter your desired user name/password and after your comment has been reviewed by an admin it will be posted and your account will be enabled. If you are already registered please login before posting.