
254
|
Chapter 7, Help and Research
#65 Follow the Rules with FxCop
HACK
useful for inspecting the source code of the .NET Framework’s Base Class
Library, as well as a helpful tool for inspecting your own assemblies. With
its bevy of features and add-ins, Reflector is an indispensable tool that every
.NET developer should know of and use.
—Scott Mitchell
HACK
#65
Follow the Rules with FxCop Hack #65
Determine whether your code and assemblies play by the rules and
guidelines.
A common problem in the realm of software development is how to prop-
erly enforce coding standards and design guidelines (this is especially true in
large corporations where a project team typically consists of several develop-
ers, each with his own coding style). In the majority of projects, these issues
are addressed in a manual effort, occurring in the form of code reviews and
design reviews. While absolutely necessary, these types of reviews often
occur too late in the process; thus, problem areas identified in those reviews
might not always get the proper attention they deserve.
To help alleviate these issues, Microsoft developed a free code analysis tool
named FxCop (http://www.gotdotnet.com/team/fxcop). FxCop checks .NET
assemblies for conformance to the Microsoft .NET Framework Design
Guidelines (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/
cpgenref/html/cpconnetframeworkdesignguidelines.asp). It uses