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:
- You now have the ability to restrict the set of warnings to Code Contract warnings only.
- The settings for the check-in policy are now stored as TFS properties (more on this in an upcoming post).
Here are the details…
To add this check-in policy to your Team Project:
- 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.
- Within the Team Explorer in Visual Studio 2010, right-click on the desired Team Project and select Team Project Settings->Source Control.
- Click on the Check-in Policy tab, select Check for Compilation Warnings and Error Policy and click OK.
- 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.
- 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:
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:
- You can download this check-in policy directly from the Visual Studio Gallery – here.
- From within Visual Studio 2010, you can use the Extension Manager to locate and download the check-in. To do this:
- Click on Tools—>Extension Manager.
- Click on the Online Gallery “tab” on the left side of the Extension Manager dialog.
- In the Search Online Gallery field, enter “check for warnings” and press Enter.
- 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.