Determining the .NET target version of a dll or .exe assembly

It’s been a while since I blogged. It’s good to be back.

I switched job descriptions and became an application architect, which means, I get to decide how solutions are designed…and if the solutions won’t work, the blame goes on me :-p

Now seriously, I was reviewing old posts and realized WordPress didn’t make a good job at keeping my old code snippets from Blogger :(, the formatting is way off and you can hardly see the code properly. Oh well.

Today we had a deployment issue, one of our projects was compiled to the wrong target framework. When we compared properties and sizes we realized this was not the ordinary dll size, but how could we determine the actual target framework?

The windows explorer properties or the IIS properties are of no use in this case, giving you only the build number.

There are actually two main options with two utilities distributed on the SDK to determine the target framework of a dll or exe:

  1. ILDASM.exe
  2. CorFlags.exe
ILDASM.exe to determine framework version
ILDASM.exe to determine framework version

and if you want to use CorFlags.exe:

CorFlags.exe determining target framework version of a dll

Happy coding 🙂

L.

5 thoughts on “Determining the .NET target version of a dll or .exe assembly”

  1. Thanks.

    Quite funny how, I refer the same page again after over a year.

    Not often, do I work in Dll components and here I am.

    Regards,
    Gautaman

  2. For those who doesn’t have the space or license to install Visual Studio.

    Microsoft SDK can be installed to use the required tools.

  3. For those who doesn’t have the space or license to install Visual Studio.

    Microsoft SDK can be installed to use the required toools.

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools

    I might’ve been silly not to include the path.

Leave a Reply

Your email address will not be published. Required fields are marked *


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