“不允许更改为 64 位应用程序"在 Visual Studio 2008 中调试时 [英] "Changes to 64-bit applications are not allowed" when debugging in Visual Studio 2008

查看:29
本文介绍了“不允许更改为 64 位应用程序"在 Visual Studio 2008 中调试时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Visual Studio 2008,C#.我尝试使用编辑并继续(在调试时编辑代码),并得到这个异常:

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?

推荐答案

CLR 级别的 64 位应用程序不支持编辑并继续",因此 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 芯片.这将导致它在 Wow64 模式下作为 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

  1. 右键单击 .EXE 应用程序并选择属性
  2. 转到构建选项卡
  3. 将平台目标组合框更改为 x86

这篇关于“不允许更改为 64 位应用程序"在 Visual Studio 2008 中调试时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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