Activating the policy
After installation on the developer workstations, you can activate the checkin policy in Team Explorer.
In the Source Control Settings dialog, switch to the Check-In Policy tab and click the Add button.
Select "Check for Code Comments 2.1 Policy" and click OK. This opens the policy configuration with its defaults.
Close all dialogs with OK and the checkin policy is active immediately.
Customizing the policy's behavior
By default, only public methods are checked for both C# and VB.NET. Obviously, you can add additional member types and visibility by simply selecting the respective check boxes.
Note that unchecking "Check Override Elements" means that if you are overriding eg methods from a base class, this derived class won't be checked for comments (those will be checked for the class defining the overridable method).
All the settings on the first configuration tab by default apply to the entire team project. Most often times, you want to limit checking to class library projects which are being reused and documentation in the form of help files is useful. Take this demo project:
The only project really suited for code comments is DemoClassLib. So instead of checking the entire team project, you can limit CCCP to include only certain source control directories (and its subdirectories) into the checking:
From now on, all source files from other directories are ignored and no longer checked.
Another useful feature is to exclude certain namespaces from checking. A common reason for this are namespaces that contain autogenerated code such as from Codesmith or GAT / GAX guidances.
Exclusion means "This namespace and all nested namespaces".