.netassemblies32bit-64bitcorflags

How to detemine (by code) the assembly corflags?


I need to write a CorFlags-like application. If I have a path to assembly file, how to I read its CorFlags?

I specifically need to know if the assembly is Any-CPU or x86 only

I want to avoid loading the assembly using reflection because I need to scan many files.


Solution

  • If you don't want to use reflection, you may check out

    CCI http://ccimetadata.codeplex.com/Wiki/View.aspx?title=API%20overview or

    Mono.Cecil http://www.mono-project.com/Cecil