Solved

Visual Studio Debugs Old Version of File

Posted on 2011-02-16
5
266 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

624 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