Transform using pattern - DirectoryNotFoundException - prod only

I have a strange error with Exception “DirectoryNotFoundException”.
I’m using a “Deploy a package” step, on which I enabled the “Configuration transforms” option, and check the “Run default XML transforms”.

When I deploy to our ‘production’ environment, this results as an error.
The file in error is not intended to be transformed (despite this is a *.config file, it has no *.production.config or *.release.config associated).

Can anyone explain this behavior?
-----LOG BEGIN----
Could not transform the file ‘C:\Octopus\Applications\production\Website2011_Data\20200827.145540.0_1\App_Data\Sitefinity\Configuration_12.2.7221_migration\LibrariesConfig.contentViewControls.BackendUserFileLibraryDocuments.views.BackendUserFileDocumentsBackendBulkEditView.config’ using the pattern ‘production’.

September 3rd 2020 09:20:27


System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Octopus\Applications\production\Website2011_Data\20200827.145540.0_1\App_Data\Sitefinity\Configuration_12.2.7221_migration’.
----LOG END----

If I used guided failure mode, the folder/file listed in the error exist.
When deploying to another environment (ex. ‘staging’), I have no error during transformation.
Your help would be appreciate to understand what I miss here / to unblock us.

Hi @gbe,

Thanks for getting in touch!

I think the transform warning may be a red herring here.
The error about the path not found may be linked to an existing issue, can you confirm what version of Octopus Server you are using?


Hi @paul.calvert
we are using

When the error occurred and you checked the folder in the error, were all the files from the package present?
I’m wondering if you’re running into a character limit issue that is only triggering when deploying on production environment due to the additional characters in the environment name or perhaps due to a difference in target machine OS versions or configuration.

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