5

I've started getting weird errors whenever I hit a breakpoint and either try to step over it or into it.

I get the message:

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

Picture of error

The projects are compiling just fine and this does not happen when I don't hit any breakpoints. I'm using Visual Studio 2019, 16.3.1 and this happens in all of my solutions, not just one. I've tried the following but nothing has worked:

  • Clearing my .vs-folder
  • Restarting Visual Studio
  • Restarting the computer
  • Clean and Rebuild
  • Removing all breakpoints and adding them again
  • All suggested answers here but none worked.
  • Upgrading to 16.3.2
  • Repairing Visual Studio

What more can I try?

Update: I followed the advice from @HansPassant and disabled Edit and Continue and that solved the most urgent problem but it seems like a hacky workaround.

Joakim Skoog
  • 766
  • 10
  • 23
  • Possible duplicate of ["Edits were made which cannot be compiled" . zero errors and Enable and edit and continue is checked in vs2010](https://stackoverflow.com/questions/36053323/edits-were-made-which-cannot-be-compiled-zero-errors-and-enable-and-edit-and) – Linda Lawton - DaImTo Oct 03 '19 at 12:48
  • @DalmTo: I've tried all suggested answers there to no avail. – Joakim Skoog Oct 03 '19 at 12:49
  • That doesnt make it not a duplicate https://stackoverflow.com/help/duplicates heres another https://stackoverflow.com/q/36053323/1841839 – Linda Lawton - DaImTo Oct 03 '19 at 12:51
  • 2
    Likely no solution, but 16.3.2 has been released yesterday. Even if it doesn't actually incorporate a fix for anything, the installation might jolt things into behaving nicer. Also, you can install VS 2019 Preview separately -- current versions are much better at keeping code and settings separated from other instances, so it may well work as nice as a complete reinstall. – Jeroen Mostert Oct 03 '19 at 12:52
  • Thanks for the input but, sadly, upgrading to 16.3.2 did not help. – Joakim Skoog Oct 03 '19 at 13:00
  • 1
    Visual Studio versions major.x.y are pretty risky for low values of y. Especially so for 16.3.0, it was a very ambitious release with a hard deadline. Seeing the updates arrive so quickly is not a good sign. You might be able to limp along by disabling Edit+Continue completely, use Tools > Options > Debugging > General. – Hans Passant Oct 03 '19 at 13:09
  • @HansPassant Disabling Edit+Continue solved the problem but it seems like a really hacky workaround. Although I guess it solved the most urgent problem I had. Thank you! – Joakim Skoog Oct 03 '19 at 13:32
  • I experienced that problem too. I just did restarting the debug session and most of the time it worked well. – Daniel Schmid Oct 03 '19 at 14:23
  • You can also [reset all VS settings](https://blogs.msdn.microsoft.com/zainnab/2010/07/16/reset-all-your-development-settings/) with `No, just reset...` or clean the VS component cache.(for VS2019, the folders are 16.xxx) – LoLance Oct 04 '19 at 09:03
  • 1
    Hi Joakim, any update for this issue? Does it still block you ? – LoLance Oct 09 '19 at 13:27
  • Yes, this is still an issue. – Joakim Skoog Oct 11 '19 at 06:10
  • Hi, is this issue reproducible in another new project or it only occurs in this one? If it's reproducible, share more details and we can check or report this issue for you:) – LoLance Oct 14 '19 at 12:38
  • @LanceLi-MSFT the same issue has occured for me as well after I updated VS to the latest version 16.3.5 – Andreas Andersson Oct 18 '19 at 07:20

1 Answers1

5

Seems to be related to this issue that they have a preview fix for in 16.4 https://developercommunity.visualstudio.com/content/problem/705494/without-any-changes-to-source-files-edits-were-mad.html?childToView=767405#comment-767405

Hi everyone, we are sorry about your experience with Edit and Continue. Yes, we were aware of the issue. Unfortunately, there are different issues that share the same symptom. We are working towards fixing all of them, it might just take some time until we are able to actually track all of them down.

The fix for this particular issue will only be available at 16.4 Preview 3+; - If you want more details on the fix, you can check it out on Roslyn: https://github.com/dotnet/roslyn/pull/38905

We suspect this will address the most common issues found in Edit and Continue, e.g. the one reported in this ticket. We will let you know when it's available for download by updating this same ticket.

Joakim Skoog
  • 766
  • 10
  • 23