How to identify which .NET framework version DLL was created with

1. C# Code

using System;
using System.Reflection;

public class LoadInvoke
{
    public static void Main(string[] args)
    {
        Assembly a = Assembly.ReflectionOnlyLoadFrom(args[0]);
        string s = a.ImageRuntimeVersion;
        Console.WriteLine("{0}: {1}", args[0], s);
    }
}

2. Compile with csc

(located in %Windir%\Microsoft.NET\Framework\[version])

3. Run from cmd

Advertisements
How to identify which .NET framework version DLL was created with

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s