Variable value not resolved before substitution in config files

We have a two-part deployment, using two NuGet packages in one project.
Ideally we want to create a release with the versions of the two packages, so I would have thought something like:
#{Octopus.Action[Obtain CalcEngine].Package.NuGetPackageVersion}.#{Octopus.Action[Obtain CRD].Package.NuGetPackageVersion}

This should give something like 3.1.2.3.1.9, so I added this in Settings, but the variable remains unresolved.

OK, so I create a variable called APP_VERSION, and simplify things by setting it to:
3.3.#{Octopus.Version.NextPatch}

I add #{APP_VERSION} to the Settings’Version Template’, and when I click ‘Create Release’ it shows the next patch number correctly.
So in my Process NuGet package step I select the option ‘Replace appSettings and connectionString entries in any .config files’ and deploy again.
Now my destination web.config has changed from:
appSettings / APP_VERSION="1.2.3"
to
appSettings / APP_VERSION=“3.3.#{Octopus.Version.NextPatch}”

The replacement occurs, but the evaluation has not.

Where am I going wrong in all of this? What would be the correct way of labeling a release versions as an amalgamation of NuGet versions, and applying that same value into the web.config of the deployed application (for displaying in the runtime environment)?
At the very least, why are my variables not resolving in the example above? Do I have to use a different syntax?

Sorry if I’m missing something obvious, but I’ve pondered the documentation and Google for some time over this issue.

Cheers,
Jason

Hi Jason,

Thanks for getting in touch! There are some variables that aren’t part of a release, and some of those are the Octopus.Version variables. project variables are not available at the time of release creation (ie Octopus.Action).
If you are happy that the correct version is being created, then in your release you can use: Octopus.Release.Number

Hope that helps!
Vanessa