Package deployment fails - Path Too Long Error is swallen - Octopus reports System.IO.DirectoryNotFoundException: Could not find a part of the path

Hi Guys,

I’ve encountered this issue before, however I never took the time to report it. I beleive the problem is when the length of the path in the package exceeds 256 charachters and the problem is with the default windows handler used to extract the package.

I my case (log attached) the length of the path where that error occures is 263 charachters. Unfortunatelly the Octopus log does not show the real error I get when I download the package and rename it by adding .zip at the end > Next right click to bring the context menu -> select Extract All… -> Click Next and you will get Error 0x80010135 Path too long:

It looks like it is a windows issue and it appears to be a known problem, however if Octopus does not use the windows handler to extract the package but something like 7-zip this error with long path in the package will not occur!

What do you recommend? Obviously in this case the quick fix was to rename the path and bring it within the limit of 256 charachters, but this is not always practical…!?


PathTooLongDeploymentError.log (4 KB)

1 Like

Hi Emil,

Thanks for getting in touch.

What version of Octopus and Windows are you using? We improved our handling of long paths for Windows 10 and Server 2016 in Octopus Deploy release 3.8.6. See this issue for the details:

If you can upgrade to a version that handles long path names, that is the best solution. We have considered different options for zip in the past but have decided against it.