سؤال

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

هل كانت مفيدة؟

المحلول

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?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top