This project is read-only.

Consider Using Command Line Tools

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

For operations not available from Visual Studio, or if you need to schedule operations, consider using command-line tools such as the Team Foundation Power Tools (Tfpt.exe) that are provided with Team Foundation Server (TFS). The Tfpt.exe tools are available as a separate download. You can use these command-line tools to schedule operations by using the Windows Task Scheduler.

To ensure that the appropriate path and other environment variables are set up, run Tf.exe from the Visual Studio 2005 Command Prompt window, or run the Vsvars32 batch file, which is normally located in DriveLetter:\Program Files\Microsoft Visual Studio 8\Common7\Tools. The Tf.exe tool supports most source control commands including Checkin, Checkout, Get, History, Shelve, Branch, Merge, Label, Status, Undelete, and Undo.

The following are common operations you might want to execute from the command line by using Tf.exe:
  • Synchronize files from the server to your local machine – tf get
  • Add a file to the server – tf add
  • Check out a file for editing – tf checkout
  • Check in pending changes – tf checkin
  • Retrieve a particular changeset from the server – tf get /version

There are certain operations that you can only be perform from the command line:
  • Delete another user’s workspace – tf workspace /delete
  • Undo another user’s check-in – tf undo
  • Unlock another user’s lock – tf lock
  • Define label scope – tf label
  • Perform a baseless merge – tf merge

Additional Resources

Last edited Jul 26, 2007 at 10:03 AM by prashantbansode, version 5


No comments yet.