Liero February 2016

Unable to determine the source control server on TFS build server

How to use TF history command line on tfs 2013 build server?

when I try to call command line tf history C:\Builds\1\MyProj\MyBuild\src\Dev on tfs build server I get:

There is no working folder mapping for "C:\Builds\1\MyProj\MyBuild\src\Dev`

When I try powershell Get-TfsItemHistory C:\Builds\1\MyProj\MyBuild\src\Dev on tfs 2013 build server, I get:

Unable to determine the source control server.

When I open visual studio on build server and in Team Explorer I try to configure workspace mapping to the folder , I get:

"The working folder C:\Builds\1\MyProj\MyBuild\src\Dev is already in use by the workspace 10_1_MHATFSBLD01;MHABLDSvc on computer MHATFSBLD01."

*MHA is name of team project collection

Answers


chief7 February 2016

Regarding the "no working folder error", you need to set the server:

 $tfs = get-tfsserver "http://server:8080/tfs/collection"
 Get-TfsItemHistory '$/YourTeamProject/MyProj/src/Dev' -Server $tfs

Obviously, you will need to adjust this for your specific TFS source structure.

Regarding the issue with the build not recognizing the TFS cmdlets, try your command in the Windows PowerShell x86 command prompt on the build agent. If it still fails you need to install the TFS cmdlets and/or fix PowerShell to run in 32 bit mode. See stackoverflow.com/questions/35292971

Post Status

Asked in February 2016
Viewed 3,644 times
Voted 5
Answered 1 times

Search




Leave an answer