"Edits were made which cannot be compiled" . zero errors and Enable and edit and continue is checked in vs2010

I am able to edit my code in debug mode but then pop up shows the error that

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

but error list is empty and i have checked enable edit and continue.

I am using vs2010.

Cleaning and restarting has not solved the problem.


Solution 1:

This problem can occur when your workspace broke. Just close Visual Studio, delete (or better first just rename) the .vs folder and start Visual Studio again.

It can even happen with VS2017.

Solution 2:

I had the same problem (VS2017), for me it was enough to menu item Build and click Clean Solution Then Rebuild Solution and everything worked fine again.