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开发者_JAVA技巧 times I build, kill the web server, kill the browser, restart Visual Studio, etc. it keeps giving me that!
Delete everything under C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
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.
I deleted the bin folder of my project and everything worked perfectly.
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.
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.
精彩评论