Edit build definition - path over 259 characters

594 views Asked by At

I need to edit my solution's build definition to include some new projects. Unfortunately, I can't do that because I keep getting the "path contains more than the allowed 259 characters" error. I've tried to rename the file to make it shorter - the total path character number is now 257. But I keep getting the same error message and the filename in the message is still the old, long one.

I'm really confused now. The file is located within: C:\Users\USER\AppData\Local\Temp\VSTFSBuild...

Does anyone know why the filename remains unchanged in the error message or knows of any other way to fix the problem?

2

There are 2 answers

2
PatrickLu-MSFT On

For this kind of long path issue, the common workarounds are 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.

For the long path issue in TFS, there had been a related uservoice and now completed.

Fix 260 character file name length limitation

We’ve removed the limitation from the BCL for the basic file manipulation functionality (CRUD). You can find more details here:

https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2/

Immo Landwerth Program Manager .NET


If you are using XAML build definition, by default the build control specifies a path for the build to access any custom assemblies your custom build process requires. If you don't have custom assemblies, you don't need this value.

Open Team Foundation Administration Console on your Build Server, and click Properties on the build controller. Remove the path and try to edit the build definition again.

enter image description here

1
Nagareboshi On

Surprisingly, I managed to overcome the problem this way:

  • go to Process and click OK to the error message when it appears
  • click "Show more details" next to my build process template
  • click the Refresh button

(I'm using Visual Studio 2012)