I am working on a Microservice based solution where in my same VS 2019 solution I have multiple microservice APIs, one API Gateway and two ASP.NET MVC presentation layer project. Everything was fine, till one day one of the presentation layer project's Startup.cs debug breakpoint will not hit.
On hovering it shows, "The breakpoint will currently not hit. A copy of Startup.cs was found in <AnotherASP.NETMVCProject.dll>, but the current source code is different from the version built into <AnotherASP.NETMVCProject.dll>".
Now the another MVC presentation project that I have, debugging works fine in its startup. Its weird why one MVC project debugging will not work stating source code is different in another MVC project. Also no source code modifications are done.
Tried the following. Got no luck:
1. Clean entire solution, rebuild
2. Delete breakpoints, clean and rebuild and then add breakpoints and run
3. Restarted machine, clean, rebuild
4. Deleted manually all Bin folder contents and clean again and rebuild
5. Closed VS, deleted ASP.NET temporary files and then restarted VS, clean and build
I am at wit's end as to why this would happen all of a sudden. This seems like a VS 2019 bug. But any solution or workaround will help.
