vb.net 如何在 Visual Studio 2010 中构建 64 位 Visual Basic.NET?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3190014/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 14:55:44  来源:igfitidea点击:

How to build 64-bit Visual Basic.NET in Visual Studio 2010?

vb.netvisual-studio-201064-bit

提问by Chris D.

Hopefully this is a simple question and I have just overlooked something somewhere...

希望这是一个简单的问题,我只是在某处忽略了一些东西......

I am writing VB.NET stuff in VS2010 on Windows 7 64-bit. It seems to build by default for a 32-bit target, how to I tell it to make a 64-bit executable?

我正在 64 位 Windows 7 上的 VS2010 中编写 VB.NET 的东西。它似乎默认为 32 位目标构建,如何告诉它生成 64 位可执行文件?

I went to the project properties -> Compiler -> Advanced, but don't see the option anywhere.

我去了项目属性 -> 编译器 -> 高级,但在任何地方都没有看到该选项。

Oh, and this is VS2010 Express, to be clear.

哦,这是 VS2010 Express,要清楚。

回答by Jess

This involves using the Configuration Manager, it's not a part of the project properties.

这涉及使用配置管理器,它不是项目属性的一部分。

Go to the Build Menu, then click Configuration Manager. Under Active solution platform, click New, then add one with x64 as the platform. Use this platform to compile for x64.

转到“构建”菜单,然后单击“配置管理器”。在活动解决方案平台下,单击新建,然后添加一个以 x64 作为平台的解决方案。使用此平台为 x64 进行编译。

回答by Panagiotis Kanavos

It seems that you have to go to Build -> Configuration Manager and create a new solution platform from the Active Solution Platform dropdown and select x64 as the new platform. That will also change your Active Platform to x64 from x86.

似乎您必须转到 Build -> Configuration Manager 并从 Active Solution Platform 下拉列表中创建一个新的解决方案平台,然后选择 x64 作为新平台。这也会将您的活动平台从 x86 更改为 x64。

Damn, but Visual Basic will never cease to surprise me! Or is this the Principle of Least Surprise, VB edition: VB will surprise you when you least expect it!

该死,但 Visual Basic 永远不会停止给我惊喜!或者这就是最小惊喜原则,VB版:VB会在你最意想不到的时候给你惊喜!