Задайте вопросЗадайте вопрос
 

Отвечено"The source code is different from the original version."

  • 10 июля 2006 г. 22:00Johann MacDonagh Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     

    I just started having problems debugging my multi-project C# solution in VS 2005 (Windows Forms with a couple class libraries). When I put a breakpoint on a method header and hit debug, the breakpoint gets hollowed out and a yellow exclamation point is added. The tooltip explains:

    "The breakpoint will not currently be hit. The source code is different from the original version."

    While not debugging, I noticed that the tooltip for the breakpoint shows a 12 line difference:

    "At MyClass.cs line, 48 ('MyNamespace.MyClass', line 36)."

    Now, if I put a breakpoint thats not on a method header, it appears to work just fine. It breaks at the correct location and I'm able to step through the code line by line. I don't have any weird situations such as "stepping" through blank lines of code that would usually accompany a mismatch between source code and debugger files. However, when I get to a certain line in my code, it crashes. The line?

    myButton.Enabled = false;

    The error? An IndexOutOfRange exception.

    So it appears that even though I'm stepping through my source code, it's getting muddled up somewhere.

    I've tried deleting all /bin and /obj folders, and I have rebuilt the entire solution half a dozen times. Still the same problem. There was another thread on this forum with this same problem, and the solution was to uncheck the "Require source code to match up exactly..." option in the Debugger options. I've tried that and it still doesn't work (doesn't break).

    Are there some temporary files I need to clear?

    Thanks,
    Johann MacDonagh

Ответы

  • 23 июля 2007 г. 1:37NOLA101 Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено

    Hey Guys,

     

    I had a very similar issue,

     

    I did nothing out of the ordinary just changed some code and all of a sudden it wouldn't build my new changes.

     

    What was really alarming was my changes were full of errors as I had copied the code from somewhere else in my project and when I built the project it would say build succeeded.

     

    I also noticed that project would build lighting fast indicating that it wasn't building at all.

     

    What worked for me was running the code analysis utility under Build\Run Code Anaylsis on [Your Project Name]

     

    I'm not sure if this utililty is in the express edition

     

    Hope this helps

Все ответы