33

We have just upgraded from TFS 2010 to TFS 2012 and we are getting problems with

tf.exe history * 

getting the following error message

Unable to determine the source control server.

1
  • 2
    Have you tried explicitly adding the [/collection:TeamProjectCollectionUrl] parameter to force connection to the Team Collection? Commented Nov 13, 2012 at 21:21

2 Answers 2

50

Had the same problem and tried all sorts of values for /collection, finally hit the right one and all TFS2012 tf commands started working again.

In Team Explorer in VS right click the server name and select properties, you need the entire URL parameter including http, the port number, everything. for me that was

http://devserver:8080/tfs/defaultcollection 

so the command is just

tf workspaces /collection:"http://devserver:8080/tfs/defaultcollection" 
Sign up to request clarification or add additional context in comments.

1 Comment

Forgot to wrap url in string and that appeared to fix it, thanks.
0

Alternatively you can configure the connection only once directly in Visual Studio by adding it. After that, tf.exe will automatically use the correct server.

This solution worked for me using visual studio 2017.

1 Comment

I am sorry for my late reply! I just used Team Explorer/Manage Connections (The Plug Symbol in the toolbar) in VS2017 and added our TFS Server. It seems as if TF.exe is aware of that connection afterwards and uses it correctly.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.