I struggled to fix it. Finally, this is what I have done for me.
Choose Debug → Preferences → Debug → General
Mark Enable .NET Framework Source Stepping.
(This may be all you need to do, but if you are like me, you also need to do what is indicated below. The solution below will also fix errors when your project loads old builds /.pdb files, despite restoration and cleaning.)
Choose Tools → Options → Projects and Solutions → Build and Run ,
Untick Only create run projects and run dependencies ,
Choose Always build from the On drop-down menu when the project is out of date .
source share