Are you facing PathTooLongException while syncing with TDS in Sitecore?

Scenario: We were using TDS smoothly in our day-to-day development life, but one day suddenly it started giving exception while syncing with Sitecore.  We were getting below exception:

The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. (PathTooLongException):


At first glance, we thought that it could be small and temporary issue with particular sitcore item and we can solve it easily. But it was not like that, situation was gradually becoming critical and everyone of team was facing the same issue. So we started digging into it and obviously first question in our mind was why did it stop suddenly? Why was it working smooth previously? Did we change anything in TDS configuration? Answer was – No. We didn’t change anything in Sitecore/TDS configuration. But yes, we did a small change and that was we moved our TDS project from short path folder to long path folder.  Do you think this could create issue? No of course not.. We were also thinking like that, but friends it was the only reason which broke TDS sync. Reason: As message description implies,there is problem with long file path of TDS sitecore item. TDS cannot sync with sitecore if TDS physical item path exceeds 260 characters. How to solve it? As per Hedgehog Development, you need to set folder alias name property to fix it.

This solution is very well explained on Hedgehog Development offical site under title of “File System Aliasing with Team Development for Sitecore” (5th video) at below link. We became happy after seeing this solution and jumped to apply it. But unfortunately it didn’t work with our environment, reason could be our TDS project is bound with SVN source-safe. We were getting “Invalid Value” message after following solution steps mentioned in above video. I am not sure why that solution was not working, we tried on few systems and everyone was facing same message. Finally the only solution that worked was – “shorten TDS project folder path”. We moved our TDS project to near C: drive and it’s done. But I would advise you that you should first go for “folder alias name property” and if it does not work for you like me then only go for “shorten folder path” option. And yes, I reported this issue to Hedgehog Development support team. They replied quickly with the same solution mentioned in above video (e.g. set folder alias name property) Friends, isn’t it interesting story :)? Facing Sitecore TDS sync issue, set folder name property/shorten TDS project path!!!

Leave a Reply