|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Architecture for Check-in Policy
The check-in policy feature is designed around two particular interactions: policy definition and policy evaluation.
Policy definition The process by which a manager or lead defines requirements that developers must satisfy before check-in. Users define policy through a configuration option for a team project. You can define the policy using the team project properties source control dialog box.
For more information, see the help file.
Policy evaluation The process of determining whether a check-in satisfies a policy. This occurs when a developer interacts with the IDE or the check-in process.
Team Foundation Server version control provides an extensible programming interface for check-in policies. Using the interface, you can extend the mechanism for validating policies specific to your own development environments. Team Foundation Server version control has a plug-in mechanism by which you integrate policies into the Team Foundation Server during installation.
Because the check-in policy feature involves two user interactions, Team Foundation Server version control provides extensible solutions in both areas. Team Foundation Server version control stores policies that any user can define in a central location. Any Team Foundation Server version control client can retrieve the policies from this location. These policies are also associated with particular team projects. Team Foundation Server version control has a storage scheme that provides a simple lookup mechanism for finding policies defined for a specific Team project.
The architecture that logically falls out of this involves three parts:
The definition client
The evaluation client
Policies are defined in Team Explorer, which makes that the definition client. Policies are evaluated as part of the check-in process. This makes the Team Foundation Server version control client the logical evaluation client. Policies need to be stored in a centralized location. The Team Foundation Server version control server completes the requirement as the server.
Every policy type that you might create for later installation must meet the same requirements. Team Foundation Server version control needs a mechanism for defining the policy as well as evaluating the policy. Furthermore, Team Foundation Server version control needs an evaluation mechanism both within and outside of Visual Studio.