If the breakpoint is in a library that is only used in one function in your main assembly, the symbols will not be loaded (and it will show the breakpoint as not being hit) until that function is called.
As it says, the "source code is different from the original version".
Right click on the project folder inside the solution explorer and choose to Clean
. Build a new version of the project and the breakpoint will work again!
If you have unchecked the DLL project in the Debug build configuration, your new code will never be built!
Go to Build --> Configuration Manager ...
(in VS2010) and check if the project with the code you're trying to debug is checked for the current build configuration.
For me it was while working on a WebSite project. After cleaning up these temp folders I got the proper compiler errors back:
C:\Documents and Settings\%username%\AppData\Local\Temp\Temporary
ASP.NET Files
C:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files
I finally resolved the problem when I discovered that a class file I had intentionally moved into a subfolder, somehow reappeared in the root folder. VS was using that one while I was editing the other.
Did you ever do this?
Would you like to continue and run the last successful build?
If you ticked the box and pressed "Yes" you will get the last successful build running even though your project does not compile. This means that whenever you set a breakpoint, you will get that error.
Try changing this value:
Go to
Uncheck Require source files to exactly match the original version
Select Debug in Solution Configurations, instead of Release
Pay attention to the "Output" window in VS. It will tell you what assemblies are loaded and when. You may see that an older version of your assembly somewhere in the folder is being loaded.
For example if you have multiple assemblies and you are currently trying to break in one of the support assemblies, the CLR will handle the assembly resolving, which may load another assembly file than the one you have referenced in the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With