I am trying to call tf.exe
from within a Powershell step of a TeamCity build configuration.
The executable is usually found at C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe
(or similar). In my script I am setting a variable to the path of tf.exe as follows:
$tfsExe = "%env.ProgramFiles(x86)%\Microsoft Visual Studio 11.0\Common7\IDE\TF.exe"
I have verified the existence of tf.exe
on the build server by accessing it through RDP. I have also called it in a powershell console window with the following command
& "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf.exe" help
which responded with the following output confirming that it is accessible and working:
Microsoft (R) TF - Team Foundation Version Control Tool, Version 11.0.50727.1
Copyright (c) Microsoft Corporation. All rights reserved.
Type tf help <command name> for command line description.
Type tf msdn <command name> for full documentation in Microsoft Document Explorer.
Commands:
tf add Adds new files and folders from a local file system location to Team Foundation version control.
tf branch Copies an item or set of items, including metadata and version control history, from one location to another on the Team Foundation version control server and in the workspace.