Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

.net

dll

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.
like image 326
Contango Avatar asked Mar 02 '11 12:03

Contango


2 Answers

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
like image 132
Iain Avatar answered Sep 17 '22 22:09

Iain


See How to determine if a .NET assembly was built for x86 or x64?

like image 43
Contango Avatar answered Sep 17 '22 22:09

Contango