"Changes to 64-bit applications are not allowed" when debugging in Visual Studio 2008

37,373

Solution 1

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.

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. Right click on the .EXE application and choose Properties
  2. Go to the Build Tab
  3. Change the Platform Target combo box to x86

enter image description here

Solution 2

Personally, what I actually want is stop-and-edit not edit-and-continue.

So I simply turn off Tools / Options / Debugging / Edit and Continue.

Doing so inhibits that pesky dialog box from pestering me about a missing feature I didn't want in the first place :-)

Solution 3

Like jcopenha said there's no edit-and-continue on x64 yet. Current version of the 64bit CLR does not support it. However, there's a work around.

You can find it on Bug Babble post.

You need to compile your managed assembly with a target CPU of x86. This will cause the 32 bit CLR to be used rather than the 64 bit CLR.

For a VB Project, right click on the project and go to Properties/Compile/Advanced Compile Options/Target CPU and set it to "x86". For a C# Project, right click on the project and go to Properites/Build/Platform Target and set it to "x86".

Hope it helps.

Solution 4

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

More information here.

Solution 5

The edit-and-continue feature simply hasn't been implemented in x64 yet. I haven't heard any updates on when they plan to do it yet.

See also Why doesn't Edit and Continue work on the x64 CLR?

Share:
37,373
ripper234
Author by

ripper234

See blog or LinkedIn Profile

Updated on October 20, 2020

Comments

  • ripper234
    ripper234 over 3 years

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

    "Changes to 64-bit applications are not allowed"

    Why is that? Is there a workaround?