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