1

I have installed VS 2008, VS 2010, VS 2012 and VS 2013.

I have found 8 files CorFlags.exe in subfolders in C:\Program Files (x86)\Microsoft SDKs\Windows\

(for example, one of them is C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0\Bin\CorFlags.exe)

The CorFlags.exe's has different lenght.

Now, I develop .NET 3.5, 4.0, 4.5, and 4.5.1 applications.

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

Which I should be use ?

updated:

All CorFlags.exe paths

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
  • 1
    It is an SDK tool, you have a lot of SDK versions. And some extra ones, 7.0 did not come along with VS. A sane choice is always the latest and greatest. The one in c:\program files\windows kits :) Run it from the Visual Studio Command Prompt so you don't have to bother picking one. – Hans Passant Mar 25 '14 at 19:00

1 Answers1

1

You should use latest one since it is backward compatible so it can be used to determine target platform of all versions of assemblies. I have tested latest CorFlags.exe with several assemblies and it worked like a charm.

Latest CorFlags.exe has new flags 32BITREQ and 32BITPREF which replaced 32BIT Flag, to know more about CorFlags for .NET Framework 4.5.1 checkout my answer here.

Just for information I have changed AnyCPU assembly to x86 assembly using CorFlags due to some production issues, which did the trick and saved my life. (Modified assembly was unsigned as well as I don't have the source code of respective assembly.)

Community
  • 1
  • 1
Ashish Singh
  • 1,221
  • 2
  • 10
  • 9