.net 控制台应用程序 32 位与 64 位 [英] .net console app 32 vs 64 bit

查看:27
本文介绍了.net 控制台应用程序 32 位与 64 位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET 中的应用程序是否需要以 64 位构建才能充分利用装有 64 位操作系统的机器,或者它是否会像 32 位构建一样利用它.基本上,我们遇到了内存不足异常的问题,建议在可能"解决问题的 64 位机器上运行控制台应用程序.问题是我们可以只启动一个 64 位的盒子并将当前的应用程序放在上面,还是我需要以 64 位方式重建应用程序.

Does a application in .NET need to be built in 64 bit to take full advantage of a machine with a 64 bit OS on it, or will it take advantage of it just as a 32 bit build. Basically, we have an issue with an out of memory exception and it was suggested to run the console app on a 64 bit box which "may" solve the issue. The question is can we just spin up a 64 box and throw the current app on it or do I need to rebuild the app in a 64 bit way.

推荐答案

如果您的应用配置为针对Any CPU"平台构建,那么它将在任一平台上正常运行.

If your app is configured to build for the "Any CPU" platform, then it'll run appropriately on either.

只要确保它不使用任何 32/64 位特定的东西,否则你会遇到问题.

Just make sure it doesn't use any 32/64 bit specific stuff, or you'll run into problems.

MSDN 文档此处.

有关缺点的一些讨论,请参阅这里

For some discussion on drawbacks, see here

这篇关于.net 控制台应用程序 32 位与 64 位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆