是什么在Visual Studio"任何CPU"目标是什么意思? [英] What does the Visual Studio "Any CPU" target mean?

查看:161
本文介绍了是什么在Visual Studio"任何CPU"目标是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些困惑与在Visual Studio 2008中的.NET平台构建选项。

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

什么是任何CPU编译目标,而它产生什么样的文件?我研究了这个任何CPU生成的输出可执行文件,发现他们是(谁不会看到来了!)x86的可执行文件。那么,有没有针对可执行文件的x86与任何CPU?

What is the "Any CPU" compilation target, and what sort of files does it generate? I examined the output executable of this "Any CPU" build and found that they are (who would not see that coming!) the x86 executables. So, is there any the difference between targeting executable to x86 vs "Any CPU"?

另一件事,我注意到了,就是托管C ++没有这个平台作为一个选项。这是为什么?这是否意味着我的怀疑任何CPU可执行文件是纯32位的人是吧?

Another thing that I noticed, is that managed C++ projects do not have this platform as an option. Why is that? Does that mean that my suspicion about "Any CPU" executables being plain 32-bit ones is right?

推荐答案

这是值为anycpu大会将在加载到64位进程和32位,当加载到32位进程JIT到64位code。

An AnyCPU assembly will JIT to 64 bit code when loaded into 64 bit process and 32 bit when loaded into a 32 bit process.

通过限制CPU,你会说有一些正在使用的组件(这是可能的非托管),需要32位或64位。

By limiting the CPU you would be saying there is something being used by the assembly (something likely unmanaged) that requires 32 bits or 64 bits.

这篇关于是什么在Visual Studio"任何CPU"目标是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆