dotnet thoughts 

a dotnet developer's technical blog

How to integrate FxCop to Visual Studio 2010 Professional

VS 2010 Professional doesn’t support Static code analysis. Here is a simple way to integrate FxCop to Visual Studio. (It was also using External tools option from Visual Studio tools menu.)

  1. In the Title text box, type FxCop.
  2. Integrate FxCop to Visual Studio

    Integrate FxCop to Visual Studio

    .

  3. To set the value of the Command text box, browse to the location where FxCop is installed, and select FxCopCmd.exe.
  4. In the arguments text box, type the following command : /c /f:$(TargetPath) /d:$(BinDir) – More information : FxCop command line reference
  5. Set the Initial Directory to the location where FxCopCmd should start.
  6. Select the Use Output window check box. – This will display the output of FxCopcmd.exe to output window, and you can double click and navigate to the line number.
  7. FxCop - Source code analysis results in VS output window

    FxCop - Source code analysis results in VS output window

  8. Click OK.

Happy static code analysis :)

1 Comment “How to integrate FxCop to Visual Studio 2010 Professional”

  1. [...] End If End Sub This method will be executed once the Build is finished. As I integrated FxCop with my Visual Studio as my external tools, it will execute the External Command 6. It will display a confirmation [...]

    Pingback by How to execute a macro after Build is completed | Dot Net Thoughts — September 15, 2011 @ 2:47 am

RSS feed for comments on this post. TrackBack URL

Leave a Response

*