Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS command line - which server?

I am currently working with 2 different TFS servers. When running the tfs commands in Visual Studio Command Prompt, how is it determined which TFS server to work with. For example, the "tf status" requires a TFS server parameter indicating which server to run the command against. But, for other commands, like delete for example, how does it know which server to perform the operation against?

Thanks in advance.

like image 878
user599236 Avatar asked Feb 01 '11 23:02

user599236


People also ask

Is TFS a server?

Team Foundation Server (TFS) is a combination of a reporting tool and version control tool.

Where is TF exe located?

The location of the tf.exe file, for example, C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE . The name of the TFS workspace. A workspace maps local and version-controlled folders on the TFS server.

How do I connect to a TFS server?

Select the Manage Connections button in Team Explorer to open the Connect page. Choose Connect to Team Project to select a different organization, TFS, or project to connect to. Select the projects to work on. If it's your first time connecting, add TFS to the list of recognized servers.

What is TFS server URL?

The TFS web portal allows you to manage source code, work items, builds, test efforts, machines and test runs. You can open the web portal from a connected project in Visual Studio or from a web browser using the following URL: http://ServerName:8080/tfs/CollectionName/ProjectName copy.


1 Answers

In general, the command line tools (tf.exe, tfpt.exe) automatically determine the server based upon the workspace that the current directory is mapped to.

If you are running the command in a directory that is not mapped in any workspace, then you will need to explictly specify the server. Some commands require a workspace (e.g. tf edit) and you will not be able to run them without a local folder workspace mapping.

To explicitly specify a server:

  • For the Visual Studio 2008 tools, you can use /server:http://tfsserver:8080/
  • For the Visual Studio 2010 tools, you use /collection:http://tfsserver:8080/tfs/Collection/

/collection also applied to other commands like witadmin.exe

like image 84
Grant Holliday Avatar answered Oct 02 '22 16:10

Grant Holliday