14 May 2010

Check for Warnings/Errors Check-in Policy

A while back, I wrote about the Check for Warnings/Errors Check-in Policy – a custom check-in policy that I had developed for Team Foundation Server 2008.  Yesterday, I published version 2.1, updated for Team Foundation Server 2010, to the Visual Studio Gallery.  The features are the same as the TFS 2008 version with a couple of exceptions:

  1. You now have the ability to restrict the set of warnings to Code Contract warnings only.
  2. The settings for the check-in policy are now stored as TFS properties (more on this in an upcoming post).

Here are the details…

Usage:

To add this check-in policy to your Team Project:

  1. Download and install the Check for Compilation Warnings and Errors Check-in Policy (see Where to Download below).  NOTE: Anyone checking in code will need to install the check-in policy on their local development workstations.
  2. Within the Team Explorer in Visual Studio 2010, right-click on the desired Team Project and select Team Project Settings->Source Control.

  3. Click on the Check-in Policy tab, select Check for Compilation Warnings and Error Policy and click OK.



  4. Click on the Edit button and select the level of Warnings and/or Errors to check for.  If you select Warnings, you can optionally restrict the set of warnings to Code Contract warnings only by checking the Code Contract Warnings Only checkbox.



  5. Click OK and OK to close the dialog windows.

Once installed and configured, the check-in policy works like any other.  You can check the Pending Changes window for violations as seen in this screen shot:

Compatibility:

This version of the Check for Compilation Warnings and Errors Check-in Policy supports Visual Studio 2010 and Team Foundation Server 2010 only - it is not compatible with Team Foundation Server 2008.

Where to Download:

There are two options for downloading:

  1. You can download this check-in policy directly from the Visual Studio Galleryhere.
  2. From within Visual Studio 2010, you can use the Extension Manager to locate and download the check-in.  To do this:
    1. Click on Tools—>Extension Manager.
    2. Click on the Online Gallery “tab” on the left side of the Extension Manager dialog.
    3. In the Search Online Gallery field, enter “check for warnings” and press Enter.
    4. Locate the “Check for Compilation Warnings and Errors Policy” (at the time of this writing, it is the only item in the search results) and click Download.

If you have any feedback, please utilize the “Reviews” and/or “Discussions” tab on the gallery link above.