visual-studio 在 64 位机器上使用 Visual Studio 2010 时无法编辑和继续,应用程序面向 x86

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

Can't edit and continue when using Visual Studio 2010 on a 64 bit machine, app targets x86

visual-studiovisual-studio-201064-bitx86edit-and-continue

提问by Sayed Ibrahim Hashimi

I'm having some problems with Edit and Continuewhen using Visual Studio 2010 on a Windows 7 64 bit machine. I've ensured the following

在 Windows 7 64 位机器上使用 Visual Studio 2010 时,我在“编辑并继续”方面遇到了一些问题。我已经确保以下

  1. Edit and Continue is enabled under Tools>Options>Debugging>Edit and Continue
  2. My solution platform is set to x86
  3. My solution configuration is set to Debug
  4. All my projects are building for Debug and x86
  5. For all projects under Projects>Properties>Build the Optimize codeis unchecked
  1. 在工具>选项>调试>编辑并继续下启用编辑并继续
  2. 我的解决方案平台设置为 x86
  3. 我的解决方案配置设置为调试
  4. 我所有的项目都是为 Debug 和 x86 构建的
  5. 对于按项目>属性的所有项目>构建优化代码选中

When I hit a break point and try to edit I and confronted with the following message.

当我遇到断点并尝试编辑时,我遇到了以下消息。

Changes are not allowed in the following cases
(source: sedotech.com)

以下情况不允许更改
(来源:sedotech.com

This is happening for me for all projects that I create whether they are WPF/Win Forms/VB.NET/C#/.NET 4/.NET 3.

对于我创建的所有项目,无论它们是 WPF/Win Forms/VB.NET/C#/.NET 4/.NET 3,都会发生这种情况。

Any ideas?

有任何想法吗?

采纳答案by Sayed Ibrahim Hashimi

OK guys I figured it out. The other night I was playing around with IntelliTraceand changed the setting to collect call information. I didn't notice the warning on that page stating "Edit and continue is disabled when collecting Call Information"! See screen shot.

好吧,伙计们,我想通了。前几天晚上,我在玩IntelliTrace并更改了设置以收集呼叫信息。我没有注意到该页面上的警告,指出“收集呼叫信息时编辑并继续被禁用”!请参阅屏幕截图。

IntelliTrace settings
(source: sedotech.com)

智能跟踪设置
(来源:sedotech.com

So I just disabled that and I was good to go. Thanks, that was really annoying.

所以我只是禁用了它,我很高兴去。谢谢,那真的很烦人。

回答by PantheR

Another solution is to check if any 3rd party references included and check their options for: Embed Interop Types. Set it to False.

另一个解决方案是检查是否包含任何 3rd 方引用并检查它们的选项:嵌入互操作类型。将其设置为 False。

回答by NewUnhandledException

One more option to check to enable the Edit and Continue Option.

要检查以启用“编辑并继续”选项的另一个选项。

Go to Project Properties and check the "Enable Edit and continue" Option

转到项目属性并选中“启用编辑并继续”选项

enter image description here

在此处输入图片说明

回答by AliReza

I found the problem!

我发现了问题!

In Advance Compile Option(in Project Properties) Uncheck Enable Optizimations

高级编译选项(在项目属性)取消选中启用Optizimations

回答by mona

I had that also solved it by noticing that solution configuration was on release and not debug.

我注意到解决方案配置是发布而不是调试,也解决了这个问题。

Changed it to debug and now I can edit and continue.

将其更改为调试,现在我可以编辑并继续。

回答by Mahmoud Salah

another reason 1-Right click on Project file then Properties.
2-Compile --> advanced compile options.
3-Choose to generate "full" instead of "pdb-only" debug info.

另一个原因 1-右键单击项目文件,然后单击属性。
2-编译 --> 高级编译选项。
3-选择生成“完整”而不是“pdb-only”调试信息。

回答by m asif

mine was working after i have done following

在我完成以下操作后,我的正在工作

under advanced compile options set target CPU to x86 (was set to any cpu)

在高级编译选项下将目标 CPU 设置为 x86(设置为任何 CPU)

and its working fine now.

它现在工作正常。

回答by OXYJAMES

If you want to edit code after compile.

如果要在编译后编辑代码。

Just compile with ctrl + F5

只需使用ctrl + F5编译

回答by Sony Nguyen

Under Code Generation section, make sure option "Enable Function-Level linking" is set to Yes (/Gy).

在代码生成部分下,确保选项“启用功能级链接”设置为是 (/Gy)。

回答by AnthonyLambert

Under Visual Studio 2013 edit and continue now works for the x64 platform.

在 Visual Studio 2013 下编辑并继续现在适用于 x64 平台。