Providing a package is not a valid for inline scripts 2018 version

We are trying to add a parameter “Octopus.Action.Package.NuGetPackageId” in a PowerShell step template. It is successful. Later when we edit any process that contains this step template, we get this error,

“Providing a package is not a valid for inline scripts.”

which results in us being unable to edit any processes

Is there a way to include this “Octopus.Action.Package.NuGetPackageId”?

Moreover, this error is confusing because i can save parameter just fine, but cannot edit other step later.

I have the same problem with the link below, but my current version is 2018.8.12


Thanks for getting in touch! I’m sorry about the confusing behavior here. This NuGetPackageId variable isn’t available from inline scripts, though you may be able to work around this by toggling the option to specify the script is coming from a package.

I’m interested in hearing more about what you’re looking to achieve here. Can you expand a bit on why you’re trying to add this parameter, and what you’re needing to do with it? There may be a better option to achieve the desired outcome. :slight_smile:

I look forward to hearing back and getting to the bottom of this one!

Best regards,


Thank you for your reply.

Currently, we use project variables to custom a connection string base on environments. e.g.

connectionString="Application Name=#{OctopusPackageName}; Data Source=#{Params.Second}"

But in PowerShell step template it failed to replace a Package name
connectionString="Application Name=#{OctopusPackageName}; Data Source=OurDatabaseName"

We try to work around by directly set “Octopus.Action.Package.NuGetPackageId” value, and it works, but initiate another problem instead.

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