#{Octopus.Action[MyDeploymentStep].Output.Package.InstallationDirectoryPath} not evaluated in my powershell script


In my project I have setup a deployment with two steps: deploy the nuget package and a child step which runs the powershell script to create a new Web Application on IIS (I am using the new template from the template repository). When I run a deployment, however, I get (sometimes) errors about the oputput.package.installationdirectorypath. The log file of the deployment shows me that, for some reason, the “macro” has not been executed. In my script it is using #{Octopus.Action[MyDeploymentStep].Output.Package.InstallationDirectoryPath} instead of a real path on the tentacle machine.

When I redeploy the same release, however, everything is fine.

What can be the issue here? Do you have any workaround for this?

I am using the prerelease, version

I can confirm this issue too.

For some steps the #{Octopus.Action[MyDeploymentStep].Output.Package.InstallationDirectoryPath} is resolved correctly, for other steps it’s not. Even though i am deplying to the same machine.

Hi Ron and Thomas,

Could you both please provide a full deployment log of a working example and a non-working example.
Email it through to vanessa at octopusdeploy.com if you do not want the information on the forums.
Seems like it will be the only way to track this issue down.


Hi Vanessa,

I made a mistake. My project had the configuration “Skip packages that are already installed”, and since one of the packages were already installed, it was skipped, however the child step still ran (is there anyway to avaoid this? - Skipping child steps, if parent step is skipped). And therefor there were no parent variables available…

Hi Thomas,

You’ve nicely stumbled on to a bug there, that behavior is not nice at all.
I’ve created a ticket that you can track here:

We are going to make the parent item (even if previously deployed) make the variables available to the child step,because there might be cases where that child step has to run and shouldn’t be skipped if a package is already installed.
Thanks for providing your findings here :slight_smile:


Hi Vanessa

For my project, I have “Always deploy app packages” and see the same issue as reported by Ron. Sometimes #{Octopus.Action[Deploy].Output.Package.InstallationDirectoryPath} gets resolved and sometimes it does not. In my environment with 2 target machines, one machine may resolve correctly and the other may not during the same deployment.

The project in which I am able to reproduce this has one Step with several child steps. The first child step has a name of “Deploy”. The steps following use the macro #{Octopus.Action[Deploy].Output.Package.InstallationDirectoryPath} in the “Custom install directory / Install to” field.

Upon deployment, the output shows “Copy files to C:\Windows\system32#{Octopus.Action[Deploy].Output.Package.InstallationDirectoryPath}” and “Copying package contents to ‘#{Octopus.Action[Deploy].Output.Package.InstallationDirectoryPath}’”

I am using version which should have fix 1043 present.

Hi All,

We found two issues in the end causing this. One was in 1043 which has been released to pre-release, the other:

Is not yet available and has not released. This fixed the main bug and I will update this thread when the release has been created.
Thank you everyone for the feedback and patience.


Hi Everyone,

This bug fix is now live and available as part of the 2.5 release which has been moved from pre-release to stable. http://octopusdeploy.com/downloads

Thanks again for your patience.