What\'s the easiest way to discover (without access to the source project) whether a .NET assembly DLL was compiled as \'x86\', \'x64\' or \'Any CPU\'?
Update: A com
C# snippet, based on the Powershell answers:
var modules = assembly.GetModules();
var kinds = new List();
var images = new List();
foreach (var module in modules)
{
PortableExecutableKinds peKinds;
ImageFileMachine imageFileMachine;
module.GetPEKind(out peKinds, out imageFileMachine);
kinds.Add(peKinds);
images.Add(imageFileMachine);
}
var distinctKinds = kinds.Distinct().ToList();
var distinctImages = images.Distinct().ToList();