Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand

Posts Tagged ‘team foundation server’

TFS 2010 – How to set Check-in Policy

Posted by JP on March 23, 2012

This article demonstrate how to enable Source Code Check-in Policy inside TFS 2010.

image

Following are the default policies available with TFS:

Policy Description
Builds This policy requires that the last build was successful for each affected continuous integration build definition.
Code Analysis This policy requires that Code Analysis is run before check-in.
Testing Policy Ensures that tests from specific test lists are successfully run before checking in.
Work Items This policy requires that one or more work items be associated with every check-in.

 

image

Step 1) Install New Policy

We can try adding a new policy that ensures Comments are associated with public methods/properties.

This is a third party plugin and you can download it from CodePlex using the following link:

http://tfsccpolicy.codeplex.com

Use the Download link to download and install the policy executable.  You need to restart Visual Studio after the installation.

image

Step 2) Open Team Explorer inside Visual Studio

image

Step 3) Open Source Control Dialog

image

Step 4) Click add button from the Check-in Policy tab

image

Step 5: Select Check for Comments item

image

Click Ok button

image

Please note that the above dialog says we have selected only Public Methods for comment requirement.

Step 6: Test the Check-in

Now we can try creating a file with comment missing for a public method.

image

Try checking in the file:

image

On checking in the above file we will get the following error dialog.

image

This makes sure that the Policy was Installed Successfully.

Summary

In this article we have explore the source code policy feature of Team Foundation Server and installing a custom Check-in policy.

Advertisements

Posted in C# | Tagged: , | Leave a Comment »

TFS 2010 Installation

Posted by JP on March 23, 2012

Team Foundation Server is more than of a Source Control:

TFS provides the following features:

  1. Source Control
  2. Build Management
  3. Project Tracking

Download Trial

http://go.microsoft.com/fwlink/?LinkID=186901

Installation is possible on:

  • Windows 7
  • Windows Vista
  • Windows 2003
  • Windows 2008

Visual Studio Power Tools for TFS

http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f

Posted in C# | Tagged: , | Leave a Comment »