"不允许更改64位应用程序和QUOT;在Visual Studio 2008中调试时,不允许、应用程序、QUOT、Studio

2023-09-08 10:00:11 作者:有梦就别怕痛

我在使用Visual Studio 2008,C#。我尝试用编辑后继续运行(编辑code,而调试),并得到此异常:

I'm using Visual Studio 2008, C#. I try to use edit-and-continue (edit the code while debugging), and get this exception:

更改为64位应用程序不准

"Changes to 64-bit applications are not allowed"

这是为什么?有没有解决办法?

Why is that? Is there a workaround?

推荐答案

编辑并继续不支持64位应用程序在CLR水平所以没有办法为Visual Studio要么实现它。

Edit and Continue is not supported on 64 bit applications at the CLR level so there is no way for Visual Studio to implement it either.

要解决这个问题,最简单的方法是针对您的应用程序的x86芯片。这将导致它在WOW 64模式运行作为一个32位的过程,因此能够ENC。您可以通过执行以下操作做到这一点

The easiest way to work around this problem is to target your application to x86 chips. This will cause it to run in Wow64 mode as a 32 bit process and hence be able to ENC. You can do this by doing the following

右键单击.EXE应用程序,并选择属性 转到生成标签 更改平台目标组合框86