FxCop 10.0 in post-build, [Location not stored in Pdb] in VS2010

1.6k views Asked by At

I'm trying to get a post-build event up and running which will get the contents of FxCop warnings/errors into the Error List

This is my post-build event commandline:

"$(ProgramFiles)\Microsoft FxCop 10.0\FxCopCmd.exe" /file:"$(TargetPath)" /console

I've succeeded in that regard, but in the Location column, the errors just say [Location not stored in Pdb], which isn't what I'm looking for. The relevant PDB file is present.

I've implemented the steps here but that is for a previous version of FxCop and it hasn't solved the problem.

I'm using Visual Studio 2010 Professional.

Here is a sample of the Error List window:

Sample Error List output

TIA

1

There are 1 answers

2
Nicole Calinoiu On BEST ANSWER

Is there a PDB file available for the target assembly in the same folder? If not, you need to generate and/or copy the PDB file so that is available to FxCp.

If you already have a PDB file present in the correct location, it may just be that you're running into rule violations for which there legitimately isn't any source context information in the PDB file. If you're not sure if this is the case, could you please provide an example of a violation for which source context information is absent even though you think it should be available?