Deployment Copying package - DirectoryNotFoundException

I’ve mapped a network location to a drive ‘T:’, but when copying the package contents, Octopus throws the next exception:

Deploying package:    C:\Octopus\Files\<packagename>

Copying package contents to 'T:\TestDeployment' 

System.IO.DirectoryNotFoundException: (3) The system cannot find the path specified: [\\?\T:\TestDeployment] 
   at Alphaleonis.Win32.NativeError.ThrowException(UInt32 errorCode, String readPath, String writePath) 
   at Alphaleonis.Win32.Filesystem.Directory.CreateDirectoryCore(KernelTransaction transaction, String path, String templatePath, ObjectSecurity directorySecurity, Boolean compress, PathFormat pathFormat).
 at Calamari.Integration.FileSystem.LongPathsDirectory.CreateDirectory(String path) 
   at Calamari.Integration.FileSystem.CalamariPhysicalFileSystem.CopyDirectory(String sourceDirectory, String targetDirectory, CancellationToken cancel) 

Using a local drive, e.g. C:, the deployment does work. Could you point me in the right direction to solve the exception?

(Note: both, T and the TestDeployment, exist).

Hi @Odrai

Thanks for getting in touch!

I suspect you have run into something similar to this issue where the underlying problem is in one of the shared libraries that we use. Are you able to confirm if which version of Octopus you are using, and if it is older than 2018.9.7 are you able to upgrade to at least 2018.9.8 (preferably either to our latest LTS or Fastlane releases).

Thanks @Odrai, I look forward to hearing from you.


Hi @Alex.Rolley,

Thank you for the quick reply.

We are using Octopus Deploy Server 4.0.5 and Tentacle 3.16.2.
Please let me know if you require any further information.

Hi @Odrai,

Since you are on an earlier version I would recommend that you upgrade, if possible to our LTS release or at lest to a version of Octopus later than 2018.9.8.

At this stage without an upgrade there isn’t any options available to me to be able to resolve the problem that you are seeing.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.