CorFlags.exe Tools _ Practical tips for checking. NET program platform targets (Platform target)

Source: Internet
Author: User
Tags reserved

The Drop-down lists of the target components of different platforms are observed first through experiments. In Visual Studio, adjust Platformtarget to any CPU, x86, and x64, compiled into EventPingPongAny.exe, EventPingPongX86.exe, respectively, EventPingPongX64.exe three assemblies.

Using the CorFlags Eventpingpong*.exe method to check the related properties, the results are 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 header: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 header: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 header:2.5

pe:pe32+

Corflags:1

Ilonly:1

32bit:0

signed:0

To change the target platform of a program that compiles to any CPU to qualify x86, you can use the following directive:

corflags/32bit+ EventPingPongAny.exe

Changing the parameter to/32bit-can be restored back to any CPU. As for the pure x64 target platform program because of PE different (for pe32+, with any CPU, x86 different), so can not directly use corflags switch, must recompile.

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.