Hi,
From your description, I understand that you have two projects: Web Application project and Class Library project, in the solution, and Web Application references to this Class Library.
Firstly, please try to rebuild your solution.
If we modify the code in the Class Library, we can remove reference of this dll and then re-add it in the Web Application.
We also can try to check Require source files to exactly match the original version (Tools -> Options -> Debugging ), which tells the debugger to verify that a source file matches the version of the source code used to build the executable you are debugging, while debugging session.
We also can try to create new project and then copy the source files such as .aspx page and .aspx.cs (.vb) from that project to this new one, and then rebuild this new one.
I look forward to hearing from you.