Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
将项目从面向 .NET 4 更改为 .NET 4.5 时,我将以下内容添加到每个构建配置的项目文件中:
<Prefer32Bit>false</Prefer32Bit>
这是什么意思?我在 MSDN 上能找到的唯一文档不太清楚。
设置 32BITPREFERRED 标志。该应用程序即使在 64 位平台上也可以作为 32 位进程运行。仅在 EXE 文件上设置此标志。如果在 DLL 上设置了该标志,则 DLL 无法在 64 位进程中加载,并引发 BadImageFormatException 异常。带有此标志的 EXE 文件可以加载到 64 位进程中。.NET Framework 4.5 中的新功能。
来自 Corflags 文档
http://msdn.microsoft.com/en-us/library/ms164699.aspx