Is there a way to force an “Any CPU” compiled app to run in 32bit mode on 64bit OS?

老子叫甜甜 提交于 2020-02-20 06:50:56

问题


If I have a "Any CPU" compiled .NET app, it will run in 64bit mode on a 64bit OS.

But if I, for whatever reason, wants to force this app to run in 32bit mode. (As if it were compiled using "x86"). Recompiling is not an option, so is this possible to config at run time ? With the .manifest file perhaps?


回答1:


I believe you can do this with CorFlags.exe

Something like:
CorFlags yourassembly.exe /32BIT+

Note that if the assembly is strong named you will also have to use the /force option which breaks the strong naming, so you'll then have to resign the assembly.



来源:https://stackoverflow.com/questions/985663/is-there-a-way-to-force-an-any-cpu-compiled-app-to-run-in-32bit-mode-on-64bit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!