visual studio - How to Tell if a .NET Assembly Was Compiled as x86, x64 or Any CPU -


What is the easiest way to find out (without access to the source project) whether a .NET assembly DLL 'x86 'Was compiled as' x64' or 'any CPU'?

UPDATE: A command line utility was enough to meet my immediate needs, but only for completeness, if someone wants to tell me how to do it programmatically then it will also be of interest , I believe.

If you want to find it on a given dll, you can use that tool Which is part of the Windows SDK:

  CorFlags.exe assembly.dll  

If you want to use this code, Take a look at the method of:

  assembly assembly = assembly.load (to "path"); Portableexactible packs; ImageFileMachine imageFileMachine; Assembly.ManifestModule.GetPEKind (peKind out, image file mashin out)  

Then you have to check peKind to check its value. For more information, see Portableexecutive Kids .


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -