Links to code samples
Got this cool list of code samples fromBuck Hodges blog
Version Control
- How to Write a Team Foundation Version Control Add-in for Visual Studio
- Team Foundation Version Control client API example (RTM version)
- Displaying the sizes and dates of files in the server
- Displaying the labels on a file, including label comments
- Example usage of VersionControlServer.CreateLabel
- Compare the content changes in a shelveset with any checked-in version
- How to check in changes on behalf of other users
- Sample checkin policy: make sure the comment isn't empty
- How to validate check-in policies, evaluate check-in notes, and check for conflicts
- How to compare (diff) trees at different versions using the API
- My take on this: https://blogs.msdn.com/buckh/archive/2006/04/06/project_diff.aspx
- Robert Horvick’s approach: https://blogs.msdn.com/roberthorvick/archive/2006/04/07/571043.aspx
- Merge history
- Programmatically showing differences between files
- Code snippet: What are my effective permissions {globally, to an item}?
- Show all pending changes on the Team Foundation server older than a given age
- Scanning history for the changesets that had policy override - simple usage of QueryHistory
- Version Control RSS Feed
TFS
- How to get the login dialog when using the Team Foundation Server API
- Listing the process templates on a TFS server
- How to list the users/groups the server knows about
- Code snippet: How to convert an account (DOMAIN\user) to its friendly name
- Simple command-line example: listing the team projects on a server
Work Item Tracking