Project Description
It is best practice to get the latest version of your code before checking in. Currently, there is no way to enforce this. This is why I created a TFS Checkin Policy that ensures that developers are editing files based on their latest version.

This DOES NOT do a 'get latest' during checkin. It only informs users that they do not have the latest version of an item.

This policy was written for, and tested on TFS 2008 using Visual Studio 2008.

I have seen others create a policy to do this, but those methods are much too inefficient. They use GetLatest using Preview Mode. Basically asking for the latest version of all files from the server, and if any arrive then they must not have the latest version. My method is much cleaner. It uses the ExtendedItem object - which has the IsLatest property.

Administrators have 2 options when using this policy:
- One failure per file
- One failure in total

If selected, One failure per file, the failure message will display the local path to each offending file.

Any code comments or suggestions are appreciated.

Last edited Jun 24, 2009 at 6:28 PM by gmcadams, version 6