I have an old dll that was compiled against the .NET framework and deployed. I am not sure which version of the .NET framework it was compiled against. I am wondering how I can determine which version of the .NET framework this dll was compiled against? I cannot trust the source code because I believe it has been upgraded to Visual Studio 2008 and changed to .NET framework version 3.5.
My idea too, but knowing reflector, it will probably complain, and give it a nice non-descript error icon.
leppie
2010-08-11 17:15:17
@leppie Shouldn't be a problem, even if it's .NET 1.1. Just change your default assembly list.
ParmesanCodice
2010-08-11 17:17:48
Thanks for your help. Reflector to the rescue once again.
mpenrow
2010-08-11 22:01:10
A:
Decompile it with ILDASM, and look at the version of mscorlib that is being referenced (should be pretty much right at the top).
leppie
2010-08-11 17:14:10
A:
You can use ILDASM...
ildasm.exe C:\foo.dll /metadata[=MDHEADER] /text /noil
Josh Stodola
2010-08-11 17:17:01
A:
You have a few options: To get it programmatically, from managed code, use Assembly.ImageRuntimeVersion:
Dim a As Assembly = Reflection.Assembly.ReflectionOnlyLoadFrom("C:\path\assembly.dll")
Dim s As String = a.ImageRuntimeVersion
From the command line, starting in v2.0, ildasm.exe will show it if you double-click on "MANIFEST" and look for "Metadata version". Determining an Image’s CLR Version
Ben Griswold
2010-08-11 17:19:00