Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 214
ripper234 Avatar asked Sep 30 '09 14:09

ripper234


2 Answers

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

like image 110
JaredPar Avatar answered Sep 30 '22 15:09

JaredPar


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 :-)

like image 20
Steve Pitchers Avatar answered Sep 30 '22 13:09

Steve Pitchers