Search code examples
visual-studio-2010debuggingrebuild

vs2010 project not rebuilding properly


I am rebuilding project first time and launch it. Works fine.
Then I change the code rebuild the project. Rebuild succeeded. I make a break-point at the project and launch in debugging mode. I do not see the changes an break-point does not hit. When I check the break-point it says: "The breakpoint will not currently be hit. The source code is different from the original version." Why is this like that?

  • I have tried cleaning project and rebuilding it again.
  • I have tried to delete everything from the debug folder.
  • I have tried closing and opening vs2010.
  • I have also tried to reset all vs2010 settings to default.

But nothing seems to help, the only thing that helps is when I restart my PC it rebuild properly and I can see the changes and the break-point hits.
Any ideas how to fix this issue?

I am working on a web project with asp.NET


Solution

  • I found a solution to my problem. All I had to do was close from task manager vhost.exe process and it rebuild properly and I was able to hit the breakpoint. Although I'm not sure why the process was not closing as soon as I close the application and stop debugging.