I noticed that my code was not being reflected in the current build of my application. Then taking a closer look and setting a break point at the code that was not being ran, I hit F5 and noticed a bubble with a warning triangle that had the following message.
The breakpoint will not currently be hit. The source code is different from the orginal version.
There are a few reasons why this happens. The most common is that the project pdb files are currently locked. These are files that hold your debugging information.
Method 1 : Simple Rebuild
- Ensure your build is set to debug.
- Right click your solution, go to Properties. Make sure your project is set to build
- Go to Build -> Rebuild Solution. This will clean out your bin folder and update the files.
Method 2 : Clearing out the PDB files
- Close all files in Visual Studio, then Visual Studio.
- Delete the PDB files in your bin folder (or where ever you are building to)
- Open Visual Studio
- Going to Build -> Rebuild Solution.
- Reopen the file
If all else fails, I would try a restart. Sometimes the process gets caught up in Windows, and restarting will release the lock to overwrite.
More info and posts on other sites in case I didn’t help :