CorFlags versions for VS 2008, VS 2010, VS 2012, VS 2013

1.3k Views Asked by At

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
1

There are 1 best solutions below

0
On

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.)