.net - 可以将 WinForms 应用程序配置为作为 "x86"运行而无需重新编译吗?

标签 .net winforms configuration x86 x86-64

为“任何 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/

相关文章:

php - 如何在PHP中设置和使用PHP_INI_SCAN_DIR环境变量?

c# - 空合并运算符的工作原理

c# - 为什么 double.Parse ("0.05") 返回 5.0?

c# - 使用 C# 测试 Ctrl 键是否按下

elasticsearch - 如何从Kibana仪表板远程访问Elasticsearch?

ssl - 带有 OpenSSL 1.0.2 的最新 Nginx 仍然无法提供 http/2

c# - 我需要一个事件来检测互联网连接/断开

.net - 在 ASP.NET MVC 中获取原始请求

c# - mysql数据库没有连接到c#?

C# 一次将字符串行合并为 3 组