6

Possible Duplicate:
“The breakpoint will not currently be hit. The source code is different from the original version.” What the hell does this mean?

(A colleague helped me answer this so I will post the question and answer...)

When I try to debug an ASP.NET app, I am getting "The breakpoint will not currently be hit. The source code is different then the original version" and no matter what I do or how many times I build, kill the web server, kill the browser, restart Visual Studio, etc. it keeps giving me that!

Community
  • 1
  • 1
JoelFan
  • 37,465
  • 35
  • 132
  • 205
  • I tried every bullet on this link and all of these answers and after attaching to the process (NUnit.exe in my example), the icon was still yellow (not red). Then when I actually launched/ran a new unit test, the icon turned red. I remember the exact same thing happening when I was attaching to w3wp.exe. I did all of these steps and it kept showing a yellow icon until I physically went into the browser and started the site again. Then the icon turned red. http://carnotaurus.philipcarney.com/post/4130422114/visual-studio-debugging-issue-with-files-of-the-same – JustBeingHelpful Apr 10 '12 at 21:43

5 Answers5

10

Delete everything under C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

JoelFan
  • 37,465
  • 35
  • 132
  • 205
2

I had the same problem with VS 2008 and an asp.net/C# web app, but deleting the \Temporary ASP.NET Files folder would not fix it. I also tried deleting the .suo file (as suggested on various blogs) but no luck.

Using Tools->Import and Export Settings->Reset All Settings fixed the problem.

Chris Vesper
  • 646
  • 7
  • 18
2

I deleted the bin folder of my project and everything worked perfectly.

Ron
  • 1,721
  • 1
  • 19
  • 43
1

I tried all of the answers above and none worked for me which is possibly due to the issue emanating from more than one cause.

What did work for me was Cleaning the solution and then Rebuilding the solution.

Nicholas Murray
  • 13,305
  • 14
  • 65
  • 84
0

I do not like to play with knives but the only thing that worked for me involves editing the .csproj file itself. So, unload the project file, edit it by cutting and pasting the three asp.net files so that they are together in the ItemGroup. However, sometimes it is necessary to go further as explained here: http://carnotaurus.tumblr.com/post/4130422114/visual-studio-debugging-issue-with-files-of-the-same - Also, I give a list of other proposed solutions that did not work for me. I hope it helps.

Phil C
  • 3,687
  • 4
  • 29
  • 51