8

EDIT: Good information provided below to diagnose, but the issue was I was running Visual Studio 2022 17.3. Version 17.4 is required for .NET 7, and I had just installed that. Once I installed the latest version of VS, all my problems went away. Install with Visual Studio

Suddenly today, debugging my ASP.NET Core 6 and 7 apps suddenly has stopped working. I hit F5 to debug, it stops on my breakpoint, but as soon as I continue or step into, I'm shown this dialog:enter image description here

I haven't made any changes to code, I'm simply trying to continue after I've stopped at a breakpoint. This just started happening today and I can't figure out what I did.

ScottG
  • 10,711
  • 25
  • 82
  • 111
  • In visual studio within `Tools > Options > Debugging > .NET/C++ Hot Reload` [`what configuration you can see here`](https://i.stack.imgur.com/WAAsm.png) – Md Farid Uddin Kiron Feb 01 '23 at 05:46

1 Answers1

0

I had the same issue with VS 17.5.5 and a simple .NET7 console application; XUnit is able to run the test. I can start the test with debugger attached till a break point is reached, then I can't step over because of the Hot reload popup.

I fixed this issue by removing the PublishSingleFile attribute from the console csproj:

<!--<PublishSingleFile>true</PublishSingleFile>-->

It seems it will be fixed in .NET8 https://github.com/dotnet/runtime/issues/42927

AlexH
  • 2,650
  • 1
  • 27
  • 35