What does the Visual Studio “Any CPU” target mean?

后端 未结 8 844
栀梦
栀梦 2020-11-22 05:05

I have some confusion related to the .NET platform build options in Visual Studio 2008.

What is the \"Any CPU\" compilation target, and what sort of files does it ge

8条回答
  •  孤独总比滥情好
    2020-11-22 06:04

    "Any CPU" means that when the program is started, the .NET Framework will figure out, based on the OS bitness, whether to run your program in 32 bits or 64 bits.

    There is a difference between x86 and Any CPU: on a x64 system, your executable compiled for X86 will run as a 32-bit executable.

    As far as your suspicions go, just go to the Visual Studio 2008 command line and run the following.

    dumpbin YourProgram.exe /headers
    

    It will tell you the bitness of your program, plus a whole lot more.

提交回复
热议问题