Long path name error

When using .Net 4.6.2 you are allowed to specify long path names as “\?\D:\very long path”.
Reference Naming Files, Paths, and Namespaces - Win32 apps | Microsoft Learn

I am using Aspose Words v4.0.30319 and Aspose Cells v4.0.30319. When I try this I get the error “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.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at Aspose.Words.Document…ctor(String fileName, LoadOptions loadOptions)
at Aspose.Words.Document…ctor(String fileName)
at Org.Frb.Mpls.FedCrawler.Service.FileTypes.WordFiles.ReadWordFile(String file) in C:\LONGPATHNAME:line 40"

@chuckmnaspose,

It seems that you are using a very old version of the API. Please download the latest version of the API and try again. In case of any issue, feel free to contact us with your feedback. We will look into it and update you accordingly. Furthermore Aspose products have no limitations to file path length by itself. However there may be limitations of operating system or file system that you are using at your end.

Sorry, I had a cut and paste error. I am using Aspose v18.5

@chuckmnaspose,

We are looking into it. We will update you very soon.

I think the problem is that it does not recognize the The \\?\ prefix can also be used with paths constructed according to the universal naming convention (UNC). To specify such a path using UNC, use the \\?\UNC\ prefix. For example, For example, \\?\D:\very long path

@chuckmnaspose,

Thank you for update. Let us try this at our end. We will update you about findings after implementing your suggestion.