Questions tagged [tf-cli]

tf.exe is the command-line client for Team Foundation Server

The default command-line client for Team Foundation Server Source control. You can use version control commands to do nearly all tasks you can do in Visual Studio, and also several tasks that can’t be done in Visual Studio. You can use the tf.exe tool to run version control commands from a command prompt or within a script.

See:

Other useful commandline tools for TFS include (from the Team Foundation Server Power Tools), tfsbuild and and .

118 questions
4
votes
1 answer

How do I authenticate with TFVC from a release-pipeline task?

I have a release pipeline and want to add a stage with a task that will write a version number into a file that is stored in TFVC. I have been attempting to use a powershell task that calls tf.exe to work with files. I thought I'd start just by…
Scott Langham
  • 58,735
  • 39
  • 131
  • 204
4
votes
2 answers

Checkin multiple files with tf.exe in one changeset

On one of our builds we are kicking off some automated process which is checking out and checking in some files automatically. This all works rather well, but at this time we are running the checkin command which looks like the following tf.exe…
Jan_V
  • 4,244
  • 1
  • 40
  • 64
4
votes
1 answer

TFS does not destroy files, unused space does not get set free

I deleted a lot of files and used the TF DESTROY cmd tool afterwards. After realizing that I missed the /startcleanup command I thought like "oh, well, tomorrow the space will be free since TFS cleans up by itself". The next day: nothing happened,…
user5955036
4
votes
1 answer

TF.exe creates folder instead of branch

I use tf.exe in my C# code to create new branches in TFS. This is what I do: public static bool TFBranch(string projectPath, string originName, string branchName) { string branchedProject = projectPath + "\\" + branchName; string…
L4c0573
  • 333
  • 1
  • 7
  • 23
4
votes
2 answers

How to get fix "You are not authorized to access" accessing VS Team Services

I can open internet explorer and login just fine. Credentials are saved in the credential manager. Trying to access any tf.exe command results in a TF30063 error. I do not have VS installed on this machine. Any suggestions on what to…
user3953989
  • 1,844
  • 3
  • 25
  • 56
4
votes
1 answer

TF.EXE command excluding executable (*.DLL) files

I'm using the TF.EXE utility to automatically move some build output into TFS as part of our automated build process. Here's the command line: tf.exe add C:\Output\*.* /recursive /noprompt tf.exe checkin C:\Output\*.* /recursive /noprompt It all…
Jon Grant
  • 11,369
  • 2
  • 37
  • 58
4
votes
1 answer

How to link a TFS workitem to another using command line

How does one link an existing TFS work item to another using in command prompt. Is there a command line option for this in TFS. I know I can use tfpt.exe to create a workitem or modify it, but I cannot find an option to link a workitem to another.
4
votes
2 answers

Using tf.exe to get code for different workspaces

I'm developing code on my machine using one local workspace to get and check in code from TFS. I'm also building an automated CI app which uses my machine and needs to get the latest code. I use the following to get latest for the CI app: tf get…
Stagg
  • 2,660
  • 5
  • 34
  • 32
3
votes
1 answer

How to export the files under a label from TFS in a script using tf?

I need a batch script that uses tf to retrieve the directory structure for a label in TFS, something like the equivalent of svn export, while not messing up with my current working workspace. This is what I managed to come up with: tf workspace /new…
Paul
  • 1,224
  • 2
  • 14
  • 31
3
votes
2 answers

Work item types in TFS 2010; Where are the XML files stored?

I am trying to add a new work item type. Where the heck are the XML files that define these? I don't see them in solution explorer, they aren't in the file system on the TFS server, so where the heck are they? I am following instructions from…
Byron Whitlock
  • 52,691
  • 28
  • 123
  • 168
3
votes
4 answers

TFS command line client default location

If I'm using the TFS command line client is it always located @ :\Program Files\Microsoft Visual Studio 8\Common7\IDE? I'm referencing this page.
213897
  • 1,561
  • 4
  • 15
  • 16
3
votes
1 answer

How to store and switch between code versions easily with TFVC

I am using local workspace. Now, say I am working on two different features, each with file modifications, file additions, and file deletions. What is the easiest way to maintain the state and switch between two versions of code for these two…
James Wierzba
  • 16,176
  • 14
  • 79
  • 120
3
votes
5 answers

Visual Studio Team Services Extension thinks Local Repository is Server Repository

I am using the Visual Studio Team Services extension in VSCode to connect to my TFVS repository. Yesterday, I updated VSCode and the extension now tells me that the repository is a Server repository when it is actually a Local Repository. As far…
Tim Hutchison
  • 3,483
  • 9
  • 40
  • 76
3
votes
2 answers

"tf status" to see pending changes without "detected" adds

I want to use TF.EXE to get a list of the pending changes in my source branch. I want the same list I see in Visual Studio's "Pending Changes" window. For instance, I current have 167 pending changes shown in the Pending Changes window, about 50/50…
Mud
  • 28,277
  • 11
  • 59
  • 92
3
votes
1 answer

TFS2013 - Clone build definition for team project using git

We want to clone a build definition for a TFS team project that uses git as its source code repository. Our aim is to duplicate the existing build definition for a new branch. When the build definition is cloned via the command line (Team Foundation…
cacau
  • 3,606
  • 3
  • 21
  • 42