I have a third-party program installed, and I want to find out what v开发者_如何学Pythonersion of the .NET framework it is using.
How do I figure that out?
Start up the Visual Studio 2008 Command Prompt, go to the folder your assembly is in, type corflags.exe assemblyName.dll
, and you should get the following information back.
Version : v4.0.30319
CLR Header: 2.5
PE : PE32
CorFlags : 1
ILONLY : 1
32BIT : 0
Signed : 0
I believe you can do that using ILDasm or .NET Reflector.
Open Visual Studio command prompt... Run ILDasm
If you open the Manifest, you should be able to get the .ver, and mscorlib's version should be target version. For ex. the following DLL is using 4.0
// Metadata version: v4.0.30319 .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 }
You can definitely get it from .NET Reflector. (See the screenshot below - the last thing listed is the Target Runtime.)
Load ILDASM and import your DLL. Double click on the 'Manifest' and it will display the framework version.
If using a utility is OK, I would recommend Process Explorer from SysInternals.
I found How to identify the framework version a DLL is using. It might mean writing a small secondary program to perform the action.
精彩评论