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?
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?
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?
Unfortunately, Edit and Continue isn't supported on 64-bit. In fact, if you try to use Edit & Continue when debugging a 64-bit application, you get the following error message: "Changes to 64-bit applications are not allowed" Many users may not be aware that by default, when you create a C# or VB project in Visual Studio 2008, the "Platform" for the project is set to "Any CPU". This means that if you run your application on a 32-bit operating system, your application will run as a 32-bit process and similarly, if you run your application on a 64-bit operating system, the application will be 64-bit. The consequence of "Any CPU" is that when you try to debug your application on a 64-bit operating system, you won't be able to use the Edit and Continue feature.
However, there is a workaround. During development, you can set the Platform for your project to 32-bit which means that your application will run as a 32-bit process even on a 64-bit operating system. This is known as WOW64 or "Windows On Windows" which basically means that you can run a 32-bit application on a 64-bit operating system.
So, how do you set the Platform for your project to 32-bit? Well, you need to create a 32-bit platform using the Visual Studio Configuration Manager. Here is a short walkthrough.
First, open the "Configuration Manager" dialog from Build –> Configuration Manager. The Configuration Manager dialog is shown below.