1

I am using TFS2018 and I am getting the following error during the GetSources step

2017-11-22T10:22:35.4137749Z TF400889: The following path contains more than the allowed 259 characters: C:\agent\_work\1\s\myverylongfoldertoalongfilenamepath. Specify a shorter path.
2017-11-22T10:22:35.4450272Z ##[error]Exit code 1 returned from process: file name 'tf', arguments 'vc get /version:58632 /recursive /overwrite C:\agent\_work\1\s /loginType:OAuth /login:.,******** /noprompt'.

I want to shorten the Build agent folder names. Is it possible to rename the _work folder to e.g. w ?

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
doorman
  • 15,707
  • 22
  • 80
  • 145

1 Answers1

2

The error you got in short currently its the TFVC limitation, from

Must not contain more than 259 Unicode characters for a single folder or file name.

Source Link: Version control paths

You could change the Build Agent Working Directory by reconfigured the build agent. You could use a instead of agent and got c:\a\_work\1\s and _work to w.

Otherwise you have to manually tweak your file/folder structure in TFS source control to bypass this issue. From C:\Agent\_work\1\s\TestCaseProject to C:\Agent\_work\1\s\TestCasePro

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62