We're moving our build from Team Build (Team Foundation Service) to a local build machine using Jenkins CI for build. However, we still want to use the Cloud for Source Control. So now we need to access the cloud TFS to get the latest build. Jenkins has an TFS Plugin, but that was made for TFS 2008.
Now I have the problem that I'm not able to access the cloud TFS with TF.exe from VS2012.
I found an article here that showed me the difference between TFS 2008 and 2010 (I need to add /tfs/DefaultCollection
to the server URL), but that didn't work with the cloud TFS.
Here's the error:
TF31002: Unable to connect to this Team Foundation Server: https://myserver.visualstudio.com/tfs/DefaultCollection.
Team Foundation Server Url: https://myserver.visualstudio.com/tfs/DefaultCollection.
Possible reasons for failure include: - The name, port number, or protocol for the Team Foundation Server is incorrect . - The Team Foundation Server is offline. - The password has expired or is incorrect.
Technical information (for administrator): The Remoteserver returned an error: (404) Not found.
I've tried it with and without the /tfs/DefaultCollection
. Same result.
Documentation, according to what I have found, is next to nothing.
Has anybody had any success accessing the cloud TFS with TF.exe?
EDIT: browsing through other articles, I saw that others did it without the /tfs
, so just add /DefaultCollection
(thanks to Microsoft for changing the URL with every version...)
However, the output is still crap.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE>tf workspaces -format:brief /server:https://myserver.visualstudio.com/DefaultCollection /login :myuser,mypassword
Result:
No workspace matching *;[NAME OF ANOTHER USER] on computer MYMACHINE found in Team Foundation Server https://myserver.visualstudio.com/DefaultCollection.
ok, found the solution... Add "/computer:*" if no workspace was mapped on the machine running tf.exe before...
Conclusion: The URL to connect to your collection in TFS changed in every version.
TFS 2008: mytfs
TFS 2010: mytfs/tfs/DefaultCollection
TFS 2012: mytfs/DefaultCollection
OMG..
来源:https://stackoverflow.com/questions/14828429/using-tf-exe-with-team-foundation-service