为“任何 CPU”编译的 WinForms 应用程序是否可以配置为在 64 位服务器上作为“x86”运行而无需重新编译应用程序?具体来说,我正在寻找一个 app.config 设置或控制面板小程序来实现这一目标。客户的所有客户端都是x86,但服务器是x64,我们喜欢在服务器上安装WinForms app,供管理员配置和监控系统。我们宁愿不只为服务器重新编译。
最佳答案
来自 http://www.request-response.com/blog/PermaLink,guid,34966ef8-3142-46b2-84e0-372b5c36ddcc.aspx
You can, however, control and override this default behaviour even after your code has been compiled. There's a handy tool called corflags.exe present in the SDK that allows you to force 'anycpu' compiled code to use 32-bit process in 64-bit world.
这个实用程序的用法可以在这里找到 http://msdn.microsoft.com/en-us/library/ms164699(VS.80).aspx
关于.net - 可以将 WinForms 应用程序配置为作为 "x86"运行而无需重新编译吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/187620/