Solved

Visual Studio Debugs Old Version of File

Posted on 2011-02-16
5
260 Views
Last Modified: 2012-05-11
I have a C# application in VS 2010 that was migrated a few weeks ago from VS2008.  I made changes to a class about a week ago, and did considerable debugging wihout problem.  Now when I look at the class again, the debugger seems to be going haywire.  When I step through the code, sometijmes the F10 command results in no movement, sometimes the step actually goes backward.  It seems to me I've had this issue some time ago, and it has something to do with the debugger working with an older vsion of the file.  But I don't remember exactly what the issue was.

Is anyone familiar with what's going on here?
0
Comment
Question by:jkavx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 23

Expert Comment

by:Snarf0001
ID: 34913039
I've had issues with this before.

Apart from the obvious (you are in fact rebuilding the project on each run), the most common issue I've had is with the temp files caching.
I have no idea why or how this starts, but find the temp asp.net files folder

C:\Windows\Microsoft.NET\Framework\xxx\Temporary ASP.NET Files

and delete everything in there.  Then try rebuilding and running again.
0
 

Author Comment

by:jkavx
ID: 34913667
Thx.  I found this folder but it was empty.
0
 
LVL 3

Expert Comment

by:chandra_darbha
ID: 34913861
Do a clean solution, delete the bin and obj folders and then rebuild the solution.

Thanks,
Chandra
0
 

Author Comment

by:jkavx
ID: 34913982
Thx.  I just tried this - cleaned the solution, deleted the bin and object folders and rebuilt the solution but I have the same debugging problem with this one class.
0
 
LVL 3

Accepted Solution

by:
chandra_darbha earned 500 total points
ID: 34922918
That means, you application is not loading the latest DLL and hence the latest PDB. During the runtime assembly binding, the CLR looks in the GAC first and then the application folders and some standard set of folders. If it finds the DLL in any other place than your bin folder where the DLL would not be the latest one, then you would get this issue. Check in GAC or any other location where the CLR might search for the assembly and update or remove the assembly from that location as appropriate.

If you don't know of any other location and the assembly is not in GAC then you can switch on Fusion logs. These are the assembly binder logs.

You can find information about the binder logs at  
http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx

Hope this helps

Thanks,
Chandra
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question