Posts
208
Comments
1144
Trackbacks
51
FxCop IDE Integration with VS2005 Professional Edition

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 Print
Comments
Gravatar
# re: FxCop IDE Integration with VS2005 Professional Edition
Peter
2/28/2008 10:18 AM
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?
Gravatar
# re: FxCop IDE Integration with VS2005 Professional Edition
Gagan Tyagi
5/27/2011 3:27 AM
FxCop is a generic tool to for code evelaution purpose.

Post Comment

Title *
Name *
Email
Comment *  
Verification

View Steve Michelotti's profile on LinkedIn

profile for Steve Michelotti at Stack Overflow, Q&A for professional and enthusiast programmers




Google My Blog

Tag Cloud