Domanda

I am trying to analyse some assemblies with NDepend but it complains that the pdb files and source files are not in sync with each other. However, the development and compilation of the assemblies has occured on the same server as where I am running NDepend from.

How can I fix this? I've seen a lot of people have this problem, from googling, but no real solutions. Also, I will be running NDepend on another server (automated build server) from the dev server, so in the future, I am likely to have the same problem again. Looking at NDepend's documentation, the path to where the source is stored must always be the same (but I never broke this rule).

Would a recompilation of the assembly fix this? How serious is this problem?

Thanks

È stato utile?

Soluzione

NDepend emits a 'PDB files and source not in sync' simply when it detects that a source file referenced by a PDB file has a more recent LastWriteTime than the PDB file. So if your build process somehow updates the LastWriteTime of your source file after compilation and before NDepend analysis this can be a false alarm, although changing the LastWriteTime of your source file after compilation sounds awkward.

A better heuristic could be to harness source files checksums contained in PDB file. By using this checksum NDepend could see if the source file content has been changed. This is how VS is working btw at debugging time. We (the NDepend Team) haven't implement this heuristic because it could be costly and the simple heuristic based on LastWriteTime is enough for most of real-world cases.

Patrick - NDepend Team

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top