How to deploy multiple packages to the same folder?

I have the same problem as discussed here:

Since this question is closed and you have moved to a new forum, I am copying the text here:

The simplest form of my question is this: I have two separate NuGet packages and at deployment time need them to end up at the same folder. Not at some fixed (constant) folder on the machine, but in the folder dynamically created by Octopus for the first package. All I need is to make second package to go to the same folder.

In a more complex form the same question is: how to deploy a package to subfolder of the previous package deployment location.

Does it make sense to let Octopus deploy everything in separate folders and then generate HTFS softlinks to simulate required folder structure?

I tried the answer you gave there:

You can use the Custom Installation Directory feature and set the bind the field to the Octopus.Action[StepName].Output.Package.InstallationDirectoryPath value.

When I try this approach I get the following error:

The custom install directory ‘Octopus.Action[Deploy My Package].Output.Package.InstallationDirectoryPath\bin\Content’ is a relative path, please specify the path as an absolute path or a UNC path.

(Where “Deploy My Package” is my Process StepName)


Running rollback conventions…

I need to be able to install this step into the \bin\Content\ subfolder of the same directory as “Deploy My Package”, but this error prevents me from doing it even though I followed your answer.

Have you changed the code so there is now another way I should do this?

/Jesper Risager.

I figured out what was wrong.

I need to wrap with #{}, so in my case it becomes:

#{Octopus.Action[Deploy My Package].Output.Package.InstallationDirectoryPath}\bin\Content\

1 Like

Hi Jesper,

Thanks for the update here! I’m glad to hear that you found the cause and have resolved this. :slight_smile:

Please do not hesitate to get in touch if you run into any further issues.

Best regards,

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