0

I have a project (C# Exe) whose platform target is x86. It contains references of different third party libraries. I am thinking to shift application from x86 to AnyCPU or x64.

Now problem I am facing is that I don't know references libraries are built on x86 or any other. One way is that I check one by one third party libraries and check their platform target (a length process as it contains too 50+ references).

Is their any way to find that dependent libraries are x86 ones or x64 or other.

fhnaseer
  • 7,159
  • 16
  • 60
  • 112
  • See: http://stackoverflow.com/questions/480696/how-to-find-if-native-dll-is-compiled-as-x64-or-x86 (should work for unmanaged as well) – atlaste Jan 21 '13 at 13:19

1 Answers1

1

You can use GetAssemblyName method to retrieve AssemblyName type, where you have ProcessorArchitecture property which provides that information.

Tigran
  • 61,654
  • 8
  • 86
  • 123
  • 2
    Does this enumerate native DLLs loaded into the process (COM interop, p/invoke)? Those are the ones most likely to not have 64-bit equivalents. – Ben Voigt Jan 21 '13 at 13:02
  • Don't think so, Native DLL has not any manifest information, which can be recovered by Reflection. – Tigran Jan 21 '13 at 13:06