I have a single solution containing several projects but am only running two right now. Project 1 runs as a windows service in Release mode but runs as a console app in Debug mode. Project 2 is an MMC snapin (output type=class library). They communicate via WCF.
TIME A
When I first started debugging yesterday after a fresh build my callstack window showed this:
lines in service...
[External Code]
--Transition from Client to Server --
lines in client...
I could double-click any line to go to that line. I could set breakpoints in either project and they would be hit.
TIME B (Sometime later in the day)
I started seeing flags on breakpoints in the client (project 2) indicating "The breakpoint will not currently be hit. The source code is different from the original version" even though I just rebuilt all projects. I had made a few code changes but (as far as I know) no project or build changes. I did a solution "clean" but that did not help. The call stack still worked the same as during TIME A.
TIME C (Next day--this morning)
I rebooted. I deleted all obj and bin directories. I rebuilt the entire solution and launched hoping a fresh start would improve the situation. Now it is worse. Breakpoints are flagged with "The breakpoint will not currently be hit. No symbols have been loaded for this document." The call stack has deteriorated to showing the client as external code:
lines in service...
[External Code]
--Transition from Client to Server --
[External Code]
- If I select show external code in the call stack it lists lines from the client assembly (mixed in with system assemblies of course) but all greyed out. In the Module window (debug >> windows >> module) the client assembly is not listed.
- If I select symbol load information from a line in the call stack it shows "cannot find or open the PDB file" for 5 different locations, the most curious one being under my project's obj/Release directory--not the obj/Debug directory--even though my project is set to Debug configuration.
- If I select load symbols from a line in the call stack then select the pdb file in either my obj/Debug or bin/Debug directory, it reports "A matching symbol file was not found in this folder".
- Configuration manager shows that all projects are set to Debug configuration and all are included in the build.
I have reviewed similar SO questions, which helped me find all the above things to examine, but have not yet found any rhyme or reason to my situation.
How can I save Visual Studio from its delirium and recover my lost symbols?