6
votes

How do I test an existing managed .NET .dll to see if its 32-bit or 64-bit?

Known dead ends:

  • "dumpbin /header" doesn't work, it returns 32-bit for everything (its only looking at the native win32 headers).
  • Dependency Walker doesn't work, as its for native win32 .dll's.
2

2 Answers

10
votes

Start up Visual Studio 2008 Command Prompt, go to the folder your assembly is in type "corflags.exe assemblyName.dll" and you should get the following info back

Version   : v4.0.30319
CLR Header: 2.5
PE        : PE32
CorFlags  : 1
ILONLY    : 1
32BIT     : 0
Signed    : 0