Cannot use variables in NuGet Package Id field in Step: Deploy NuGet Package

Hi

We are using Teamcity to produce two NuGet packages for our website. Once is a build using the Debug build configuration and one is built using the Release configuration. This is because we deploy the ProjectName.Debug package to our Dev environment and the ProjectName.Live package to the Live/Production servers.

So we have the following build artefacts:

  • ProjectName.Debug-1.0.1.nupkg
  • ProjectName.Live-1.0.1.nupkg

We then are using the TeamCity step “Create Release” to run Octopus which has a “Process Step” of “Deploy NuGetPackage” which have configured using the following in the NuGet Package ID field:

ProjectName.#{Octopus.Environment.Name}

We are getting an error message in the TeamCity build log of “The version number for step ‘ProjectName’ cannot be automatically resolved because the feed or package ID is dynamic”.

This issue on GitHub seems to indicate that this is possible https://github.com/OctopusDeploy/Issues/issues/671 but it does not work for us.

Any ideas?
We are essentially trying to deploy the Debug package to our Dev environment and the Release package to the Live environment.

Oh we have version 2.10.567 installed

Apologies that should of read: 2.5.10.567

Hi Mark,

Thanks for getting in touch! This is a bug with the TeamCity plugin and Octopus. The variable in a package name does work, when you create a release manually, it’s the TeamCity / Octopus part where this is failing. So I have created a new ticket, as the original one is completed and working.
You can track it here: https://github.com/OctopusDeploy/Issues/issues/1249

Thanks!
Vanessa

Thanks Vanessa. I’ll wait for the changes to the TeamCity plugin as we have found a way to workaround the issue for now but it’s not ideal.