强制 C# 应用程序编译为 x64 而不是 AnyCpu [英] Force C# app to compile as x64 instead of AnyCpu

查看:29
本文介绍了强制 C# 应用程序编译为 x64 而不是 AnyCpu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 C# 2010 Express 在 C# 应用程序中引用本机 x64 dll.我有一个演示项目,它是从 2008 项目转换而来的,该项目的属性中有配置和平台选项,但我创建的新项目没有!下拉菜单不存在 - 事实上我什至无法从调试切换到发布.它们都使用 .Net Framework 4,它们之间的其他一切似乎都相同.

I've being driven up the wall trying to reference native x64 dlls in a C# app, using C# 2010 Express. I have a demo project that was converted from a 2008 project that has configuration and platform options in its properties, but the new projects that I've created don't! The dropdowns just don't exist - in fact I can't even switch from Debug to Release. Both of them use .Net Framework 4 and everything else seems the same between them.

在 C++ 和转换后的 C# 项目中,这很简单,您只需打开解决方案的配置管理器并运行,但我的新 C# 项目的上下文菜单中没有.

In C++ and the converted C# project it's simple, you just open the solution's Configuration Manager and go, but my new C# project doesn't have that in the context menu.

由于大量内存需求,我需要能够引用 x64 下的 x64 dll 和 x86 下的 x86 dll.谁能解释为什么缺少该选项或指出如何修复它?

I need to be able to reference the x64 dlls under x64 and the x86 dlls under x86, due to massive memory requirements. Can anyone explain why the option is missing or point me to how to fix it?

推荐答案

选择 Build - Configuration Manager.在 Platform 下选择 new,然后在那里选择 x64.

Select Build - Configuration Manager. Under the Platform select new, then select x64 there.

这篇关于强制 C# 应用程序编译为 x64 而不是 AnyCpu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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