0
votes

VSTS Build definition fails at Get Sources step from TFS.

Below is the error:

"error]Microsoft.VisualStudio.Services.Agent.Util.ProcessExitCodeException: Exit code 1 returned from process: file name 'tf', arguments 'vc get /version:131 /recursive /overwrite D:\a\3\s /loginType:OAuth /login:.,*** /noprompt'."

Please help.

2
Do you mean the Get sources step? - renklus
Have you tried cleaning the build directories? Tasks > Get sources > Clean: true, Clean options: All build directories. social.msdn.microsoft.com/Forums/en-US/… - renklus
Can you share the screen shot for how the TFVC repo in Get sources step configured? And what's the agent did you use? - Marina Liu
Yes, I meant Get Sources step. Sorry for the typo. I have selected the source TFVC and created a Map with server path. The "Local path under ($(build.sourcesDirectory)" is empty. If I put any local path there it does not save and gives this error "definition.Repository.Mappings.Mapping.LocalPath" - Nayana M
Agent used is "Hosted VS2017" - Nayana M

2 Answers

3
votes

You might see this error when the changes that you are trying to check in contain a file/folder to a location that is not mapped to list of sources with the build definition.

Error message is not beautiful enough but it is there to stop accidental check-ins.

Scan through your pending changes and see if there is any file that is from a folder that is not mapped as a source folder in build definition.

If there is one, either add that path to build definition folder list or move the files into a folder that is mapped as source folder.

0
votes
  1. Close all projects. 2 Connect to your repository.
  2. In pending changes do not filter by any project, just see all files which is it check-in.
  3. Map and check-in files and folders.

Try to build again