0

I have a deployed WPF exe that I have some concern that in the field it is truly running as x86 so I can be assured I am not running into the strange behaviour that people have mentioned when you are set to AnyCPU because of WOW64. My project (only assembly in the project, although I do rely on a 32bit dll) settings are:enter image description here

Yet my Solution Configuration is set to AnyCPU. enter image description here

Can I still be confident that my app is just 32bit?

Oh, here are my corflags.

enter image description here

4

1 回答 1

1

这是 VS2010 中的一个设计缺陷,当您从早期版本的 VS 转换项目时,它尤其明显。平台名称不会以任何方式影响最终进程的位数。它只是一个名称,它不会直接影响托管项目的任何项目设置。

只有项目 + 属性、构建、“平台目标”设置很重要。此外,只有 EXE 项目的设置很重要,DLL 必须以 EXE 项目在启动时选择的任何位数为基础。因此,DLL 项目的正常设置是 AnyCPU。如果您希望您的进程为 32 位,则将 EXE 项目上的设置更改为 x86。如果您希望平台名称匹配,则只需添加另一个名为“x86”的平台名称,这也是您在 VS2010 中创建新项目时的默认名称。让平台名称与 C# 平台目标设置匹配取决于您,这不是自动的。不要忘记更改发布配置上的设置。

平台名称对于本地项目,尤其是 C++ 项目变得很重要。因为它们不支持 AnyCPU 之类的东西,所以您需要为它们单独构建。平台选择器现在可用于在构建之间轻松切换。

于 2012-11-17T16:24:15.830 回答