I've checked out a tag for a Visual Studio 2008 project into a new local folder. (The local folder is different than where I normally work on HEAD code.)
I did a 'clean' and 'rebuild' on the project -- which created a DLL file. It rebuilt successfully and is located in the correct build area.
When I look at the files in Solution Explorer, it shows the correct absolute path for all the files within the new folder.
The problem is that when I set a breakpoint and try to debug the code, it never hits the breakpoint. When I right click on the breakpoint and look at 'Location' it shows me a path to where the file had been in the HEAD area when it was uploaded into SVN. I don't see where it is getting that old path from.
Here's a small checklist of things that can go wrong:
Verify loaded Modules (Ctrl + D + M usually). See that your code modules are loaded from where you expect them to load.
When doing clean/rebuild, only the project's output is cleaned (if I have
MyAssembly
project that builds aMyASsembly.dll
, only the file relevant for this project will be removed. Any other assemblies that are referenced are not deleted in the cleanup process.Try to isolate the issue. Start debugging with F10 (step into the debugged code). See if the entry point is OK, but only some other code that you're trying to hit is taken from the wrong location.
Visual Studio editor does not understand unix style end of line. try to use unix2dos util on the misbehaving source files.
After firing up the debugger, it might help to use menu Debug -> Windows -> Modules to see exactly where Visual Studio is loading the assembly from.
Also, verify that you are building in Debug mode. I hate to admit that occasionally I build in Release mode and then wonder why the debugger does not stop at breakpoints.