mohamedradwan.com - Nothing can beat experience
Post
Cancel

TF.exe Fast Overview

In this post, I will give a fast overview of the tf.exe command line. I will show how to use different options, like checkin, workspaces, view, diff, status, and workfold. The most important consideration is to navigate to the mapping folder inside the working machine so we can use different options; otherwise, we will see the following error:

[Unable to determine the workspace. You may be able to correct this by running][‘tf workspaces /collection:TeamProjectCollectionUrl’].

The following is a step-by-step video for the post:

Open the Visual Studio Command Prompt as Administrator, and type tf msdn. This will display the help.

Open-VS-Command-Line

TF-msdn

Type tf help checkin to display the help for the checkin option.

Display-help-about-option

We will go to the project settings and add 2 notes: Reviewer and Time. After that, we will get back to the command line and type:

1
tf checkin /comment:"Hello this is my comment" /notes:"Reviewer=M.Radwan;Time=5:00"

TF-Checkin-with-comment-notes

This will display the checkin dialog-box with the typed comments and notes.

TF-Comment

TF-Notes

Now we will output the different between 2 changeset in a file, type

1
tf diff FabrikamFiber.CallCenterfabrikamfiber.webcontrollers /version: c7\~c26 \>c:Radwan.txt

TF-output-diff-in-file

Open the file using

Notepad2

and select the Diff Files schema (Into ALM withTFS)

TF-Open-diff-with-notepad2

TF-diff

To view a file a specific version type

1
2
tfview FabrikamFiber.CallCenterfabrikamfiber.webcontrollersCustomerControllers.cs
/version:c26 

TF-view

Trending Tags