'Visual Studio Debugging Issue: The breakpoint will not be hit. Breakpoint set but not yet bound

I have a solution in Visual Studio 2019 with 4 C# projects in it. The startup project is my Web project using local IIS to run my web application, and then control will jump to different C# files in other projects. Control can hit breakpoints in the other projects, but I cannot get my breakpoints to work in one project. When I load the web application and try to stop at a breakpoint, they are not hit, and the application finishes what it was doing. Unfortunately, I need to be able to debug the project. It is skipping to look for a bug in the code. The error I get when I hover over the breakpoint is "The breakpoint will not be hit. Breakpoint set but not yet bound."

I have been searching for hours on google and trying all different suggestions and nothing is working.

  • Visual studio is set to Debug (Not release).
  • I tried cleaning the solution, restarting visual studio, deleting the .vs folder, and rebuilding.
  • When I tried to make the project with the breakpoints as my default start up and using debugging to attach to a process it gives me another error that says it cannot load the symbols.
  • The configuration manager is all set to debug
  • Define DEBUG constant and Trace constant is checked
  • Optimize code is unchecked

If anyone can help I would greatly appreciate it! I am still learning and new to visual studio and I have no idea why I cannot stop at the breakpoint and I been at this for hours! Thank you!



Sources

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

Source: Stack Overflow

Solution Source