2

I am trying to sync items in TDS during sync some items I am getting this error.

Could not find a part of the path 
'D:\Projects\WebsiteProject\TDS\Intranet\TDS.Master.Templates\sitecore\templates\User Defined\Folder1\Folder2\Folder3\Example Template\Example Template Section\title.item'.
Please see the output window for more details. (SitecoreSyncException):
   at HedgehogDevelopment.SitecoreProject.VSIP.Controls.SyncWithSitecore.RunSyncForProject(SitecoreProjectNode project)
   at HedgehogDevelopment.SitecoreProject.VSIP.Controls.SyncWithSitecore.RunSync()


Inner Exception Details:
Exception Could not find a part of the path 'D:\Projects\WebsiteProject\TDS\Intranet\TDS.Master.Templates\sitecore\templates\User Defined\Folder1\Folder2\Folder3\Example Template\Example Template Section\title.item'. (DirectoryNotFoundException):
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes, Boolean checkHost)
   at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
   at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreItemNode.RefreshSitecoreInfo(String sitecoreItemPath)
   at HedgehogDevelopment.SitecoreProject.VSIP.SitecoreProjectNode.CreateSitecoreItemNode(String localItemPath, String sitecoreIcon, HierarchyNode parent)
   at HedgehogDevelopment.SitecoreProject.VSIP.Controls.SitecoreSyncTreeNode.DoSyncAction(Boolean& applyToAll)
   at HedgehogDevelopment.SitecoreProject.VSIP.Controls.SyncWithSitecore.RunSyncForProject(SitecoreProjectNode project)
Exception An exception occured while updating the sitecore item \sitecore\templates\User Defined\Folder1\Folder2\Folder3\Example Template\Example Template Section\title.item

My Sitecore version is 9.3.

1 Answer 1

4

I resolved this issue, it was related to File Name Length Error in TDS.

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 we 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”.

For more information you can read below article

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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