vb.net 如何在 64 位应用程序和 VB2008 Express 上启用编辑并继续?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30183/
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 13:48:56  来源:igfitidea点击:

How do I enable Edit and Continue on a 64-bit application and VB2008 Express?

vb.netvisual-studio-200864-bit

提问by SilverViper

When I try to do that I get the following error:

当我尝试这样做时,我收到以下错误:

Changes to 64-bit applications are not allowed.

不允许更改 64 位应用程序。



@Wilka: That option wasn't available until I selected Tools > Options > Projects and Solutions > General and check "Show advanced build configurations". Though I found this hint from your MSDN link. So if you edit your comment, I can make it the accepted answer...

@Wilka:直到我选择“工具”>“选项”>“项目和解决方案”>“常规”并选中“显示高级构建配置”后,该选项才可用。虽然我从你的 MSDN 链接中找到了这个提示。所以如果你编辑你的评论,我可以把它变成公认的答案......

Thanks everybody!

谢谢大家!



Please see my first comment on this question, it's not there... Somehow... I can select Target framework though (2.0, 3.0 and 3.5), not that I see any use of that for this particular problem...

请参阅我对这个问题的第一条评论,它不存在......不知何故......我可以选择目标框架(2.0、3.0和3.5),但我没有看到这个特定问题的任何用途......



It doesn't have to be a 64bit program, actually, I rather prefer it to be 32bit anyway since it is more like a utility and it should work on 32bit systems.

它不一定是 64 位程序,实际上,我更喜欢它是 32 位,因为它更像是一个实用程序,它应该在 32 位系统上工作。

Also, I'm running Vista at 64bit. Maybe that has something to do with it?

另外,我在 64 位上运行 Vista。也许这与它有关?

@Rob Cooper: Now I think of it, I never had the chance of selecting either a 64bit or a 32bit application when creating the solution/project/application... And according to your link "64-Bit Debugging (X64)" is possible with MS VB2008 express edition.

@Rob Cooper:现在我想起来了,在创建解决方案/项目/应用程序时,我从来没有机会选择 64 位或 32 位应用程序...根据您的链接“64 位调试 (X64)”是可以使用 MS VB2008 速成版。



Oh btw, I found the following:

哦顺便说一句,我发现了以下内容:

If you are debugging a 64-bit application and want to use Edit and Continue, you must change the target platform and compile the application as a 32-bit application. You can change this setting by opening the Project Properties and going to the Compile page. On that page, click Advanced Compile Options and change the Target CPU setting to x86 in the Advanced Compiler Settings dialog box. Link

如果正在调试 64 位应用程序并希望使用“编辑并继续”,则必须更改目标平台并将应用程序编译为 32 位应用程序。您可以通过打开“项目属性”并转到“编译”页面来更改此设置。在该页面上,单击高级编译选项并在高级编译器设置对话框中将目标 CPU 设置更改为 x86。关联

But I dont see the Target CPU setting...

但我没有看到目标 CPU 设置...

采纳答案by Wilka

You could try:

你可以试试:

In Visual Basic 2008 Express Edition: Build menu > Configuration Manager...

Change Active solution platform: to "...", choose "x86", save the new platform.

Now the "x86" option is available in the Compile settings.

在 Visual Basic 2008 Express Edition 中:构建菜单 > 配置管理器...

更改活动解决方案平台:到“...”,选择“x86”,保存新平台。

现在“x86”选项在编译设置中可用。

You may need to enable "Show advanced build configurations" first, in Tools > Options > Projects and Solutions > General

您可能需要先在工具 > 选项 > 项目和解决方案 > 常规中启用“显示高级构建配置”

(from this poston MSDN forums)

(来自MSDN 论坛上的这篇文章

回答by Wilka

The dialog you're looking for is this one in the project properties:

您正在寻找的对话框是项目属性中的对话框:

Platform target

平台目标

by default, the target will be "Any CPU" which means it'll run as 64bit on a 64bit OS (like you're using), or 32bit on a 32bit OS - so this wont stop it from working on 32bit systems. But like you said, to use Edit & Continue you will need to target x86 (so it runs as 32bit).

默认情况下,目标将是“任何 CPU”,这意味着它将在 64 位操作系统上以 64 位运行(就像您正在使用的那样),或在 32 位操作系统上以 32 位运行 - 所以这不会阻止它在 32 位系统上工作。但是就像您说的,要使用“编辑并继续”,您需要以 x86 为目标(因此它以 32 位运行)。

Edit: fixed screenshot (I had the C# one, not the VB one)

编辑:固定屏幕截图(我有 C# 一个,而不是 VB 一个)

回答by kenchilada

The "Edit and Continue" feature for 64-bit code will be supported under Visual Studio 2013.

Visual Studio 2013 将支持 64 位代码的“编辑并继续”功能。

More information here.

更多信息在这里

回答by Rob Cooper

AFAIK Visual Studio Express does not come with 64bit support.

AFAIK Visual Studio Express 不支持 64 位。