PathTooLongException during uSync migration with d...
# help-with-umbraco
u
While working with uSync Migrations on Umbraco, I'm encountering a System.IO.PathTooLongException when trying to create a uSync migration file for deeply nested contents. The issue seems to be related to the Windows path length limitation. I am currently using UseShortIdNames configuration in uSyncBackOffice.Config to try to mitigate this issue, but the error persists.
Copy code
WARN  Jumoo.uSync.BackOffice.uSyncEvents - Failed to save node: System.IO.PathTooLongException: 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.
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at Jumoo.uSync.BackOffice.Helpers.uSyncIOHelper.SaveNode(XElement node, String path)
Configuration Umbraco: 7.15.10 uSync: 4.0.16 uSync.Migration.Packer: v7_v7.1.0 Is there an option within uSync to flatten the folder structure for migration files to avoid this PathTooLongException? Alternatively, are there other settings or best practices I should follow to prevent this error from occurring with deeply nested content structures?
m
I got round this by updating my database to V8 were uSync has a guid file name option, all the custom properties were fine as they had package.manifests so uSync understood them still
2 Views