I had this problem when debugging that it shows wrong source file. When I went to disassembler, I found that it is showing wrong path (not the path which I was trying to debug).
Note: I have the same project in 2 different locations. When debugging, the file is pointed to different location.
I tried deleting and updating the DLL. But that did not work.
Finally I figured out the reason and am posting here so that it may help any other developer facing the same issue. I did the below steps!!
- Right click solution from solution explorer.
- Go to properties of the open solution.
- Click on debug source files. Under this, you will find a window "Do not look for these source files".
- Under that, the path of my source files was listed.
- I deleted the wrong source file path, it worked out. (I don't know yet how the path got updated there, but finally it worked after deleting from that location.)
Naina