Click here to Skip to main content
12,896,175 members (51,350 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 11 Jan 2012

Assembly CLR Version

, 11 Jan 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
A way to quickly find the CLR version of a .NET assembly from the command line
I've been searching for a way to quickly find the CLR version of a .NET assembly from the command line.

Found references about ILDADM, DUMPBIN, assembly reflection methods, and so on. But still, those tools dump a lot of information and could directly find what I need, at least from a command line.

Here's what I found.

Using some gnuutil[^] commands (I love these tools on Windows environment), I extracted exactly the CLR version like this:

Command line
ildasm /header /text [ASSEMBLY_PATH] | grep -A 7 "Metadata Header" | tail -n 1

//              'v2.0.50727' Version String

The ildasm command will dump a lot of information and the header will dump even further information.
Grep will search the Metadata Header text and will display the following 7 lines.
Tail will only retrieve the last line from the previous 7 lines.

Hope this will help you on catching old assemblies.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Portugal Portugal
No Biography provided

You may also be interested in...

Comments and Discussions

Questionsimple Way: Pin
narenderkumardhull15-Mar-13 1:23
membernarenderkumardhull15-Mar-13 1:23 
AnswerRe: simple Way: Pin
SergioAmorim15-Mar-13 1:27
memberSergioAmorim15-Mar-13 1:27 
GeneralRe: simple Way: Pin
narenderkumardhull15-Mar-13 2:08
membernarenderkumardhull15-Mar-13 2:08 
General???? ????? ?????? ???? ???????? Pin
smsm ahmed29-Jan-12 1:41
membersmsm ahmed29-Jan-12 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 11 Jan 2012
Article Copyright 2012 by SergioAmorim
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid