Adding FxCop to VS.NET

I just ran across a simple method of integrating FxCop into the IDE. I’m sure this is what everyone wants… 🙂

  • In the IDE select Tools | External Tools
  • Select the Add button
  • For Title type "FxCop"
  • For Command: "C:Program FilesMicrosoft FxCop 1.312FxCopCmd.exe" (or whatever your path is)
  • For Arguments: /c /f:$(TargetPath) /r:"C:Program FilesMicrosoft FxCop 1.312Rules" (change your path accordingly)
  • Make sure to Check "Use Output Window"

That’s it. Select Tools | FxCop to run an analysis on the current project. The output isn’t as pretty as running the GUI version, but at least you can run it quickly without leaving the IDE.

Advertisements
This entry was posted in .NET. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s