Why is Visual Studio 2013 loading a mismatched PDB from a different folder?

When debugging a web application, my Visual Studio 2013 loads the old PDB symbols. Clean up solution folder and Temporary ASP.NET Files

only works once. The problem arises as soon as I make another change. More details:

  • (VS launch)
  • Run project using F5 => Load Breakpoints
  • Make changes (for example add a space)
  • Press F5 => Breakpoints are not loaded
  • Wait a little (maybe 30 seconds). Press F5. Breakpoints.

When the breakpoints fail to load, the modules window shows inappropriate paths and sometimes it shows multiple versions of my DLL:

enter image description here

The old version of DLL and PDB (1) is still loaded (load order 67). The new DLL (157) uses the old PDB version. In Process Explorer, I can see that the w3wp process has two AppDomains that appear to correspond to the two versions of the apps. After a few seconds, the old version is unloaded, but of course the new DLL continues to use the old PDB.

In the file system, Temporary ASP.NET Files

the DLLs and PDBs are linked correctly. Each pair has its own folder.

How can I map PDB to Visual Studio download? Alternatively, how can I force IIS to unload the old application before it launches the new version and tell Visual Studio that it can now connect now?

+3


source to share





All Articles