VSTS 2008 Custom Code Analysis Rule Sample

Rating: No reviews yet
Downloads: 339
Released: Jun 11, 2008
Updated: Jun 11, 2008 by christhi
Dev status: -not yet defined by owner-

Recommended Download

Source Code Custom Code Analysis Rule Sample for VSTS 2008
source code, 236K, uploaded Jun 11, 2008 - 339 downloads

Release Notes

This is an updated version of a Security Code Analysis Rule for VSTS 2008 Team Edition for Developers

I couldn’t find a custom code analysis rule sample that worked with VSTS 2008 so I updated a 2005 sample from this old article (http://www.devx.com/dotnet/Article/35417/1954?pf=true). I had to change a few things besides the project structure (more than what the migration assistant will do) such as the rules.xml schema is slightly different (and undocumented to boot) and I had to change some of the namespaces (the Fxcop namespace has change from 2.0 to 3.5) as well as bind to the new version of the FxCop and Cci assemblies and voila we have a working custom code analysis sample!

This sample looks for data members with the word “pass” in them and gives you a warning if it finds them – just a starting sample. To make this work just compile and move the CustomSecurityRule.dll assembly to your \Program Files\Microsoft Visual Studio 9.0\Team Tools\Static Analysis Tools\FxCop\Rules directory and reload VS.NET. The Custom Security Rule Group should appear in the rules list. Pretty simple actually.

Reviews for this release

No reviews yet for this release.