'Edit and Continue / Hot Reload issues

Visual Studio 17.1.0 net6.0

I have a .net6 web app. Anytime I make a change, hot reload, and then hit a break point I get the 'Edit and Continue Applying code updates...' popup. Every break point I hit after that, it pops up and won't go away unless I restart the app. Doesn't matter what the code change is. It could be adding a comment to a .cs file.

Even if I don't hot reload it causes issues. Say I add a comment to a .cs file but don't save. Same thing happens and restart of app is needed.

Basically hot reload just doesn't work and not worth having enabled. That Edit and continue screen takes 1-2 minutes to complete each time.

enter image description here



Solution 1:[1]

I just fixed this. It appears that since this was either

  1. VS 2019 project
  2. dotnet 5 project migrated to .net6
  3. Both 1 and 2

That not all the settings followed it. I ended up creating a .net6 MVC project from scratch and compared everything. The one change I did that corrected it was adding the debug source files under

Solution | Properties| Common Properties | Debug Source Files

For some reason mine was blank.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Clarke76