Skip to main content
 首页 » 编程设计

c#之为什么 32 位首选标志甚至存在

2024年02月05日7haluo1

我已经阅读了一些关于 32 位首选标志含义的帖子和 SO 问题。根据MSDN post

The difference, then, between “Any CPU 32-bit preferred” and “x86” is only this: a .NET application compiled to x86 will fail to run on an ARM Windows system, but an “Any CPU 32-bit preferred” application will run successfully.

因此,似乎没有理由不使用这个标志。

为什么有人不喜欢使用这个标志?

请您参考如下方法:

这是有原因的,总是是有原因的,一旦 64 位 ARM 处理器可用,它就解决了一个歧义。将 Platform Target 更改为 x86 是什么意思?您是说“应该只在 x86 处理器上运行”吗?或者您的意思是“应该只在 32 位模式下运行”?

“首选 32 位模式”选项消除了歧义。