Octopus variable is not being evaluated when creating virtual directory

I am using the community IIS Virtual Directory - Create step template to create a virtual directory that references the installation folder for a deployed package. In the Physical Path box, I am using an Octopus parameter to reference that install directory:

#{Octopus.Action[Deploy my files].Package.InstallationDirectoryPath}

However, that value is not being evaluated, but rather interpreted literally, so when I go to IIS, the virtual directory is created with the right name, but a physical path of #{Octopus.Action[Deploy help files].Package.InstallationDirectoryPath} ! I set the value by clicking the Custom Expression box next to the textbox and selecting the value I wanted, so the template at least claims to allow Octopus variables, it’s just not evaluating them. Or is that an Octopus function?


Thanks for reaching out! In 3.4.7 we introduced built-in (meaning no-library-based) steps for lots of things in IIS, included Virtual Directories. I encourage you to give those new steps a try and stop using the community step as soon as you can.

We’ll be providing a lot more support to the built-in steps, and if anyone happens to find a bug in them, we’ll fix it a lot faster than its community counterpart.

Doc about the new step: https://octopus.com/docs/deploying-applications/iis-websites-and-application-pools#IISWebsitesandApplicationPools-DeployIISVirtualDirectoryvirtual-directory


Yes, that fixed it. Maybe there should be an option to mark templates as
obsolete, and indicate the recommended replacement/approach. It’s a little
non-obvious that Deploy An IIS Web Site would be used for creating a
virtual directory when there is a task template named after exactly what
you are trying to achieve, which is what my mistake is.

Anyway, thanks for your help!


Hi David,

Thanks for the feedback! We had an internal discussion after your comment, and we decided to change the title and/or description to make our support for Web Apps and Virtual Directories a bit more obvious: https://github.com/OctopusDeploy/Issues/issues/3496