1

We are trying to use Bamboo for continuous integration. During build creation we are getting errors "File Name Too Long" for tds items.

fatal: cannot create directory at 'src/Project/Website/tds/content/Sitecore.Project.Website.Content/Sitecore/Content/sample-path': Filename too long
Checkout to revision 01bd9dkdkd919276ffbd0b1024e86b3e8d14b7f42a has failed.

How we can configure continuous integration for Sitecore with TDS in this case?

6

By default Microsoft has a character limitation for file paths. The folder and file name must remain under 260 characters. If you’re familiar with Twitter, 260 characters seems like a breeze. However, most projects easily hit that limit. For this they have created a work around in TDS.

The File Alias function in TDS allows you to shorten the file path to fit in the requirements that Microsoft set. You’ll probably see the following error if trying to sync items into a TDS project tree that already exceeds the path length:

“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”

Imagine you have the following tree existing in your Sitecore instance and TDS: enter image description here

If you browse the tree inside Windows Explorer, you’ll see the same folder structure, replicated on the file system – this is how items are serialized: enter image description here

Now let’s look at the file system alias – going back into the TDS project and viewing the properties of an item or folder in the tree, you’ll see a File system Alias section there:

enter image description here

Simply inserting a name of your choosing there will result in the item being renamed on the file system. In this case, we renamed the Sitecore folder named “FolderOne” to just “1”: enter image description here

If we now go and check back on the file system, we’ll see that the path to our template has changed, and has effectively become shorter by 7 characters. enter image description here

We can always give alias to more items in the tree, in order to achieve shorter paths:

enter image description here

enter image description here

Sometimes people get worried that the alias of items in their TDS project will screw with the item names in Sitecore. As you’ve seen above, an item consists of 2 parts – the item inside the TDS project and then the serialized .item file itself. After undergoing the alias process, the item keeps the original name and path; what changes is the path/name on the file system itself. This will not affect the name in Sitecore.

Source: https://www.teamdevelopmentforsitecore.com/Blog/file-length-error-tds

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.