In my case it was an wrong setting in the project/properties/build tab
I have a mainproject that references project xxx.dll
Breakpoint's in the referenced dll are not being hit.
The reference to the dll is set to bin\debug\xxx.dll
in the library folder
So when I debug the mainproject, it goes to the folder bin\debug
of the library to look for the xxx.dll.
But, in the library's properties, for some dark reason the Output path
was set to bin\x86\debug
in stead of bin\debug
Because of this every build of the library put the new dll in the folder bin\x86\debug
in stead of in bin\debug
So VS always found an old dll of the library when debugging, thus the error was right, there was an different source.
So I corrected the Output path
from the library to bin\debug
so the reference of the mainproject will now find the correct version, and now my breakpoint is being hit again.
This took my weeks to figure out