Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit and continue feature stopped working in Visual Studio 2010

The Visual Studio Edit and Continue feature stopped on Visual Studio 2010, and I don't know what has caused the problem.

I am working on a Windows application program using C#. This application was initially developed in Visual Studio 2008, and later upgraded to Visual Studio 2010.

Everything was working fine, including Edit and Continue, until I upgraded the .NET Framework from 3.5 to 4.0.

Now when I use debug mode, changing any line of the code in the IDE results in the following message:

Edits were made which cannot compiled. Execution cannot continue until the compile errors are fixed.

Actually, there are no compilation errors, and I must restart the Visual studio to get the updates to run.

How can I get Edit and Continue to work again?

like image 363
Cracker Avatar asked Jan 24 '11 12:01

Cracker


People also ask

How edit and continue works?

For those who don't know about it, it allows you to edit code while you are debugging a running process, re-compile the code while the binary is still running and continue using the application seamlessly with the new code, without the need to restart it.

How do I disable debugging in Visual Studio 2010?

Stop ExecutionSelect "Stop debugging" from the Debug menu to end a debugging session. You also can stop debugging from the Processes window. In that window, right-click the executing process and select the Detach Process command or the Terminate Process command.

How do I turn off debugging in Visual Studio?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.


2 Answers

In the Solution Explorer view, right-click on each reference of References, choose Properties. In the Properties view, sign False to the field of Embed Interop Types. This works for me.

like image 66
Dianyang Wu Avatar answered Sep 22 '22 04:09

Dianyang Wu


The Edit and Continue feature does not work with the dynamic keyword.

I tried to remove the method that uses a dynamic parameter, and the converted project now works on Visual Studio 2010.

Internet research reveals that is is a bug that has been reported to Microsoft. The link below has more details:

  • Dynamic object as method parameters breaks edit and continue for the class and the project
like image 42
Cracker Avatar answered Sep 25 '22 04:09

Cracker