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.
Team Foundation Server (TFS) is a combination of a reporting tool and version control tool.
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.
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.
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.
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:
/server:http://tfsserver:8080/
/collection:http://tfsserver:8080/tfs/Collection/
/collection
also applied to other commands like witadmin.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With