I want to use a variable for defining the nuget package. The variable is scoped by channel. When creating a release it fails with
The resource ‘#{NuGetPackage} version 3.0.6492.463’ was not found.
Since I have to choose a channel at the time I do the release it seems like the variable would be able to be set correctly. Is there anyway to work around this? How do you create a release (either thru the UI or TeamCity) when you have the nuget package name defined with a variable.
Yes, you do have to select a channel at Release creation time, however variable resolution only happens when there’s actually a deployment. Most of the scopes don’t apply outside the context of a deployment, so it’s not possible to tell definitively what the value of the variable will be until then.
You should be able to create the release, but you’ll get that message as a warning until you actually deploy. If there’s still an error, try creating a NuGetPackage variable that’s unscoped (it should be overridden by the channel-scoped value). On release creation, Octopus will try to find an unscoped variable as a starting point.