doorman
doorman

Reputation: 16959

Azure Devops Specify a shorter path error

We are using the new DevOps build server (on premise) to build a .Net project using the Visual Build Step. When we run the build we get the following error and the build stops during the checkout step:

TF400889: The following path contains more than the allowed 259 characters "long path" Specify a shorter path.

We used to get this error in the older XAML builds but the build continued running. Is there a way to ignore this error in DevOps as well?

Upvotes: 1

Views: 920

Answers (2)

Etienne
Etienne

Reputation: 1100

Your best bet would be to refactor you application so it doesn't have long paths but if you are running your agent on windows 2016 or better, you can always try this: https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/ (article mentions Windows 10 but it works for Server 2016 also).

Good luck, Etienne

Upvotes: 1

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51153

build stops during the checkout step. Is there a way to ignore this error in DevOps as well?

No, there is no way to ignore this error. Since it cause the build failed to check out source directory for future tasks.

For this kind of long path issue, the common workaround is to shorten the build path on the server.

For example: instead of \xx\Build\Drop\ProjectName, just use \xx\Build\Drop (or \xx\Builds) since the project name is also in the build name.

Windows imposes the 25x character limit, so if you are running against windows-based agents, you will definitely still run into that. This is not related to XAML or new build system in TFS.

Upvotes: 1

Related Questions