This project is read-only.

PathTooLongException in TFS when checking in from OSX

Sep 19, 2012 at 11:27 AM


I installed git-tf on my Mac, and cloned an existing tfs-project to the folder /Git/srvxxxx/. 

Then I added a couple of files to the tree, added them to git (commands: git add iOS/*, then git commit -m "first").

If I try to check in my changes to TFS, I get an exception: 'TF10217: Team Foundation was unable to complete your request due to an unexpected error'.

The event log in TFS tells my that I caused a PathTooLongException. 

I really wouldn't know what's wrong. The longest local path on the Mac is 84 characters long, and the path in TFS would not be much longer than that. 

Any idea, anyone?



TF53010: The following error has occurred in a Team Foundation component or extension:

Assembly: Microsoft.TeamFoundation.VersionControl.Server, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727

Url: http://srv0180:8080/VersionControl/v1.0/repository.asmx [method: POST]

User Agent: Team Explorer Everywhere, SKU:13 (SDK; Mac OS X x86_64 10.7.4)

Headers: Content-Length=97288&Content-Type=application%2fsoap%2bxml%3b+charset%3dutf-8&Accept-Encoding=gzip&Accept-Language=en-US&Host=srv0180%3a8080&User-Agent=Team+Explorer+Everywhere%2c+SKU%3a13+(SDK+

Path: /VersionControl/v1.0/repository.asmx

Local Request: False

Host Address:

User: ...[authentication type: NTLM]

Exception Message: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (type PathTooLongException)

Exception Stack Trace: at Microsoft.TeamFoundation.VersionControl.Server.Validation.checkLocalItem(String& item, String parameterName, Boolean allowNull, Boolean allowWildcards, Boolean allow8Dot3Paths, Boolean checkReservedCharacters)

Sep 19, 2012 at 12:27 PM

In the scenario in the previous post I had cloned the entire team project, which contains some pretty deeply nested files - maybe resulting in path names longer than 260 characters in my git repository. Those files make the entire local git repository useless.

I would love it if the git-tf could warn me if it gets a file from TFS which has a (too) long file name....

The work-around for now is to clone only a small bit of the team project, from somewhere deep in the directory tree.


Sep 19, 2012 at 4:32 PM


When executing git tf checkin. git tf creates a temp workspace under the .git\tf folder, today TFS has a 260 character path limitation and the only solution would be to map a subset of the directory tree.

That said, I agree with you it would be great if git-tf would warn at clone time that the file paths are too long. I created an issue to track the work to add this ability.

Thank you so much for your feedback here.