Search code examples
c#.netvisual-studiopdb-files

Will older PDBs of previous releases match with the DLLs of newer releases that haven't been changed from the previous release?


So we are building a .NET project in our company and it requires us to save the PDBs of each release for debugging purposes in the future. We have this idea to optimize the space requirements. Instead of storing all the PDBs in the newer releases we thought of storing only the PDBs of the modified DLLs from the previous release and later retrieve the unchanged PDBs from the previous archives. So is it feasible to store only the PDBs of the modified DLLs and will the PDBs of the unchanged DLLs match the newer DLLs after the build?

I read in an online article that a unique GUID is generated between the DLLs and the PDBs to determine the match. Is this GUID unique for each build? (even for the unchanged DLLs)


Solution

  • The answer to your question is No. The dlls and their corresponding pdbs are linked together by timestamp and checksum (or similar). Each new build creates new pdbs, and they won't match the old ones (and VS won't accept them as matching). Note that any two builds of the same dll will be binary different, even if the source code did not change at all, since they also contain timestamps and similar dynamic information.