CorFlags.exe checks the. NET program Platform Target Tool

Source: Internet
Author: User

First, observe the drop-down list of target components on different platforms through the experiment. In Visual Studio, adjust PlatformTarget to Any CPU in sequence, x86and x64, and compile eventpingpongany.exe, EventPingPongX86.exe, and EventPingPongX64.exe.

Use the corflags EventPingPong *. exe method to check related properties. The result is as follows:

H: \ Lab \ EventPingPong \ bin> corflags EventPingPongAny.exe

Microsoft (R). NET Framework CorFlags Conversion Tool. Version 4.0.30319.1

Copyright (c) Microsoft Corporation. All rights reserved.

 

Version: v2.0.50727

CLR head: 2.5

PE: PE32

CorFlags: 1

ILONLY: 1

32BIT: 0

Signed: 0

 

H: \ Lab \ EventPingPong \ bin> corflags EventPingPongx86.exe

Microsoft (R). NET Framework CorFlags Conversion Tool. Version 4.0.30319.1

Copyright (c) Microsoft Corporation. All rights reserved.

 

Version: v2.0.50727

CLR head: 2.5

PE: PE32

CorFlags: 3

ILONLY: 1

32BIT: 1

Signed: 0

 

H: \ Lab \ EventPingPong \ bin> corflags EventPingPongx64.exe

Microsoft (R). NET Framework CorFlags Conversion Tool. Version 4.0.30319.1

Copyright (c) Microsoft Corporation. All rights reserved.

 

Version: v2.0.50727

CLR head: 2.5

PE: PE32 +

CorFlags: 1

ILONLY: 1

32BIT: 0

Signed: 0

To change the target platform of the program compiled into Any CPU to x86, run the following command:

CorFlags/32BIT + EventPingPongAny.exe

Change the parameter to/32BIT, and then you can restore it back to Any CPU. Because the programs on the pure x64 target platform are different from those on PE (for PE32 +, different from Any CPU and x86), CorFlags cannot be switched directly and must be re-compiled.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.