CorFlags.exe (CorFlags Conversion Tool)

CorFlags.exe (CorFlags Conversion Tool)


The CorFlags Conversion tool allows you to configure the CorFlags section of the header of a portable executable image.

This tool is automatically installed with Visual Studio. To run the tool, use the Developer Command Prompt (or the Visual Studio Command Prompt in Windows 7). For more information, see Visual Studio Command Prompt.

At the command prompt, type the following:

CorFlags.exe assembly [options]

Required parameter



The name of the assembly for which to configure the CorFlags.





Sets the 32BITREQUIRED flag.


Clears the 32BITREQUIRED flag.


Sets the 32BITPREFERRED flag. The app runs as a 32-bit process even on 64-bit platforms. Set this flag only on EXE files. If the flag is set on a DLL, the DLL fails to load in 64-bit processes, and a BadImageFormatException exception is thrown. An EXE file with this flag can be loaded into a 64-bit process.

New in the .NET Framework 4.5.


Clears the 32BITPREFERRED flag.

New in the .NET Framework 4.5.


Displays command syntax and options for the tool.


Forces an update even if the assembly is strong-named.


If you update a strong-named assembly, you must sign it again before executing its code.


Displays command syntax and options for the tool.


Sets the ILONLY flag.


Clears the ILONLY flag.


Suppresses the Microsoft startup banner display.


Reverts the CLR header version to 2.0.


Upgrades the CLR header version to 2.5.


Assemblies must have a CLR header version of 2.5 or greater to run natively.

If no options are specified, the CorFlags Conversion tool displays the flags for the specified assembly.

© 2015 Microsoft