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
0
votes
2 answers

how can I use tf.exe to checkin single file without getting popup dialog box?

I'm trying to do a checkin of a single file from the command line using tf.exe: tf.exe checkin myfile.cs But whenever I do, I get a popup dialog asking me to select source files. How can I get it to checkin just this single file without getting the…
cashonly
  • 119
  • 9
0
votes
2 answers

How to work with tfs files from code?

I have a desktop application to modify some xml files that are under source control. The program should be able to get the files, modify them and make a checkin. I already know how to do all that with tf; however, I don't know how to run the…
0
votes
1 answer

How to monitor a TFVC branch for folder addition?

I'm looking for something that would let me know if a new folder has been added directly under my branch in TFVC. I tried using the tf client but though I can fetch the changesets and get history but I couldn't find what I was looking for. What I…
boredDev
  • 317
  • 3
  • 18
0
votes
1 answer

Team foundation client command to reset workspace

Is there a command (or series of commands) to sync a TFVC workspace with the server, ensuring that what's on disk exactly matches what's checked in to the server. tf vc scorch almost does what's needed, in that it syncs the client workspace with…
JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
0
votes
1 answer

TF.exe workspace remapping and switching

Folks, I am trying to unshelve and then download a single file using TF.exe command line utility. But i keep facing problems. This is being done from teamcity interface. There a better way of doing this ? To unshelve if "%ShelvesetName%"=="" exit…
Sudheej
  • 1,873
  • 6
  • 30
  • 57
0
votes
1 answer

Manage Build Controllers

I would like to disable/enable Build Controller (or Build Agents) from a bat file. I want to do this so we can schedule builds every night, but then disable them during code-freeze. "TFPT builddefinition /enabled:false" is close... but that is only…
RGuggisberg
  • 4,630
  • 2
  • 18
  • 27
0
votes
0 answers

How to execute TF commands in Jenkins

I am trying to merge a branch continuously ( every 5 minute) using Jenkins. I am using Visual Studio, and so using the TFS tf command merge, i do this tf merge $/ServerFolderA $/ServerFolderB / recursive I also tried to add, checkout,…
uniXVanXcel
  • 807
  • 1
  • 10
  • 25
0
votes
2 answers

"GetLatest" with Powershell doesn't download files on new TFS workspace

I'm trying to create a Powershell script that will setup a brand new workspace in a temporary location, do a GetLatest on selected solutions/projects, and download the source code so that I can then trigger further build/versioning operations. I…
Detail
  • 785
  • 9
  • 23
0
votes
1 answer

Can the tf.exe vc merge /discard command be undone?

I am using the tf.exe vc merge /discard command to remove a few changesets as merge candidates, and was wondering if there was a way to undo this operation?
0
votes
1 answer

tf.exe Equivalent to Deleting Added Files

In Visual Studio 2015 connected to a team project on TFS 2015, I can go to Team Viewer -> Pending Changes and I can see a list of files in my (local) workspace which are "adds" but have not yet been promoted to source control. These are listed in a…
Matthew James Briggs
  • 2,085
  • 2
  • 28
  • 58
0
votes
1 answer

Initial Check-In with TF.exe

I am trying to checkin a few files, that weren't added to the TFS yet. Is that possible? My current batch script is able to update already existant files: set USER=%1 set PASS=%2 "%ProgramFiles(x86)%\Microsoft Visual Studio…
Jannik
  • 2,310
  • 6
  • 32
  • 61
0
votes
1 answer

tf.exe checkin only included pending changes

I have a batch file that will checkin my pending changes using tf.exe, but it checks in all pending changes. I'm trying to find a way to only checkin included pending changes in VS2015 and leave excluded files alone. Here's what I have: "C:\Program…
Duderino9000
  • 2,535
  • 4
  • 31
  • 37
0
votes
2 answers

PowerShell suppresses TF command UI, when output is captured in a variable

I experienced a very weird behavior when I execute a PowerShell script. I want to run a sub-command of the tf command. This executable usually works as a console application, but the sub-command tf resolve command displays a dialog, which I want to…
Marcell Spies
  • 331
  • 3
  • 8
0
votes
1 answer

get labeled files from TFS In cases where there are files with multiple labels

I need LABEL_A files for my deployment today , I use tf label /server:http://tfs:8080 LABEL_B $/Project/Folder /recursive tf label /server:http://tfs:8080 LABEL_B $/Project/Folder /recursive /version:LLABEL_A Now I have LABEL_A files merged in…
Elango Mani
  • 354
  • 4
  • 21
0
votes
1 answer

Can I check in to TFS from CLI with a work item association?

I can attempt to check in to TFS, but I get a policy violation because it isn't associated with a work item. That's fine, I do that all the time in VS, but I'm trying to do it via the command line and I can't figure out how to associate the tf vc…
Josh
  • 6,944
  • 8
  • 41
  • 64