Steve Michelotti

C#, ASP.NET, and other stuff

  Home  |   Contact  |   Syndication    |   Login
  51 Posts | 1 Stories | 155 Comments | 52 Trackbacks

News



Tag Cloud


Archives

Post Categories

Image Galleries

Articles

Blogs

VS2005 Team System has the capability of seamlessly integrating FxCop inside the IDE.  This is also possible with non-Team System versions such as Professional edition by using External Tools - the FxCop documentation for this can be found here:

http://www.gotdotnet.com/team/fxcop/Docs/FxCopCmd/FxCopCmd_VS.html

So what happens if you want to have this convenient IDE integration but point your analysis at an *.FxCop project file rather than pointing directly to assemblies?  The main thing you have to do is tell the tool (via the command line) where to look.  For example, the easiest solution would be to decide on a “standard” such as always storing your *.fxcop file in the solution root and naming it consistently (e.g., SolutionAnalysis.fxcop).  If you do that, then all you have to do to get FxCop to analyze with IDE integration is 1) follow the standard help link from above, and 2) set these command line values:

Title: : &FxCop
Command:  C:\Program Files\Microsoft FxCop 1.35\FxCopCmd.exe
Arguments:  /console /p:SolutionAnalysis.FxCop
Initial Directory:  $(SolutionDir)

Once you do that, all your analysis will be displayed in the Output console window within the IDE.  What's even nicer is that when FxCop flags you for errors, you can double-click on the message in the console window and it will automatically take you to the offending line of code.

posted on Tuesday, January 31, 2006 1:18 PM

Feedback

# re: FxCop IDE Integration with VS2005 Professional Edition 2/28/2008 10:18 AM Peter
Thanks for this tip - should be on the Blog.

http://www.gotdotnet.com/team/fxcop/Docs/FxCopCmd/FxCopCmd_VS.html is broken. Can you provide a new link?

Post Feedback

Title:
Name:
Email: (never displayed)
Url:
Comments: 
Please add 2 and 2 and type the answer here: