2

Yes, I've seen this previous question here and none of the solutions have worked.

On Visual Studio Community 2019 I was debugging a project that I've been working on for years. I have a common library project, that I've built, that I use on multiple solutions - one web, one exe.

In working on the EXE solution, which is one windows app project + about half a dozen other custom libraries, I was debugging along without issue. Changed a bit of code and then started another debugging cycle and suddenly symbols couldn't be loaded for one of the libraries.

If I look in the output folder, the PDB file for the library IS there. If I look in the Debugging Windows... Modules, the library does NOT show up.

If I load up the web project which also uses this library, it debugs fine and the module shows up in the modules window.

I've tried everything in the thread I've referenced above. I've also tried:

  • Build, Clean, rebuild, in all sorts of different orders - the PDB is ALWAYS there.
  • Removing and readding references to the project from the EXE
  • Creating a whole new solution
  • Going to a different PC entirely - one that I knew was working yesterday - grabbing my latest code, and still the same problem.
  • Reverting back to several different old branches of code, on BOTH the new machine and the old machine, same issue.
  • Installing VS updates
  • Repairing VS
  • Checking my GAC to make sure there was nothing for these libraries in there
  • Played with every project setting I could find
  • Cursing and praying to the programming Gods

I have no clue what to do next. Obviously this one specific project is not loading the DLL, but I can't figure out any possible reason why. The only thing that changed between a successful debug and the missing symbols error was me changing a few lines of code and clicking Run again. (And I even removed the code changes and it still failed.)

I just don't understand what could have caused this, for this singular library, on this single solution.

Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
Dave Sanders
  • 3,135
  • 4
  • 33
  • 43
  • Since you said you changed code, try to disable `Require source files to exactly match the original version`. – Rand Random Jul 21 '21 at 14:53
  • Because its a C# project, in case that's useful. – Dave Sanders Jul 21 '21 at 15:06
  • 1
    And I disabled that setting, no luck - still doesn't load the PDB module even though its in the folder. – Dave Sanders Jul 21 '21 at 15:06
  • Did you give deleting `.vs`, `bin` and `obj` folders a try? – Rand Random Jul 21 '21 at 15:09
  • You could try to delete or rename the pdb file and see if visual studio wants to offer to browse to the pdb file. – Rand Random Jul 21 '21 at 15:16
  • Yes, I've deleted those folders many times, and done many Cleans (which also deletes them) – Dave Sanders Jul 21 '21 at 15:32
  • You could try using the [Fusion Log Viewer](https://learn.microsoft.com/en-us/dotnet/framework/tools/fuslogvw-exe-assembly-binding-log-viewer) and see what's actually being loaded (and from _where_, most importantly). If your DLL shows up there, the module windows seems to be lying - or at least considers 'loaded DLLs' somewhat different. – devsmn Jul 21 '21 at 15:56
  • Running the fusion log viewer (as administrator) does not show me anything. One thing I did notice while testing that is in the "Output" window when debugging, my undebugable projects are both not shown there either. (Turns out I have two different projects in the solution that I can't debug - but I can't figure out what the similarities are.) – Dave Sanders Jul 21 '21 at 19:24

1 Answers1

3

To anyone who finds this later, I've solved the problem and my code is debugging fine again.

And I have zero clue about what changed, why it started working, or if I even did anything at all. I came back to it the next day, systematically started working through various tests, and suddenly everything was fine - though I didn't do anything differently than the day before.

These are the times that try men's souls.

Dave Sanders
  • 3,135
  • 4
  • 33
  • 43