0
votes

I had set up fxcop Custom Dictionaries for several projects in Visual Studio. However when it comes to running FxCop as part of our build process (using NAnt), we ran into trouble.

We currently have FxCop set up to run with the command line arguments /project:ProjectPath as well as /file:OutputPath/*.dll, and it seems to be respecting those arguments.

How can I tell FxCop to respect what I've set up in my .csproj files; through either the command line, or in a .fxcop project file?

Ideally, we don't want to have to change anything any time we add a new project or a new CustomDictionary.xml file. Hopefully, it would find all the custom dictionaries by itself.

1

1 Answers

0
votes

The task that executes FxCopCmd in MSBuild actually fetches the codeanalysisdictionary.xml file location from the .csproj. So if you want to execute fxcop yourself, you'd either have to run it through MSBuild or duplicate the behavior into your nant task.