I am trying to map the TFS workspace to local by using the below comment
tf workfold /map /login:username,pwd /server:http://servername:8080/tfs /workspace:'$/source/app/TFS_Label' 'C:\TFS_Label'
but am getting the error saying
An argument error occurred: workfold requires zero, one, or two path arguments.
kindly help on this issue.I am new to TFS.
You're not quite passing in the correct arguments to TF Workfold
Also the server
parameter is deprecated.
If you're using TFS 2005 / 2008 then you need to use server
, if your using TFS 2010 or above then you need to use collection
instead. Having said that server
will work if you have a single collection in TFS that is called "DefaultCollection" on newer versions of TFS
The syntax is
tf workfold /map serverfolder localfolder
[/collection:TeamProjectCollectionUrl]
[/workspace:workspacename]
[/login:username,[password]]
So for TFS 2010 or newer your command should look something like this
tf workfold "$/source/app/TFS_Label" "C:\TFS_Label" /map /login:username,pwd /collection:http://servername:8080/tfs/defaultcollection /workspace:"MyWorkspaceName"
For older versions of TFS use
tf workfold "$/source/app/TFS_Label" "C:\TFS_Label" /map /login:username,pwd /server:http://servername:8080/tfs /workspace:"MyWorkspaceName"
A workspace is the container for the folder mapping so if you have an existing workspace then you can use that. If not then you can create a workspace using the TF Workspace /new
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