Can't create release. Package versions could not be resolved

Hi all

First I want to tell you what I have and what I want to do.

TFS + TeamCity 9.0.3 (build 32334) + Octopus Deploy

  1. Lifecycle: -
  2. Environments:
  3. Each project have two steps - Staging: and Production:
  4. I’m using TeamCity. That’s my build steps: NuGet Installer (takes last build from TFS) -> MSBuild (command line params: and -> Octopus Create Release (additional params: -> Octopus Deploy Release (additional params:
    So, TC creates two nupkg files in two different TC build configurations: for Staging (Project.Debug.{version}.nupkg) and for Production (ProjectName.Release.{version}.nupkg)

So what the problem is?
TC build log:
Here is the problem: I can’t create Staging release without Production nupkg file?

What the ways I have to resolve this problem?

  1. I can create Production step just before the Production deploy
  2. I will start Production deploy first - it generates production nupkg file and then I can deploy Staging
  3. I hope you can tell me another way? Maybe I can disable/skip release package checking or something else?


Hi Boris,

Thanks for reaching out. Instead of using 2 steps (one for each environment), use only one step and fill the fields with variables instead of hardcoded values.

For example for the field “NuGet package ID” create 2 variables like this:

Name value scope
NugetID client.project.debug staging
NugetID client.project.release production

Then on the field “NuGet package ID” in your single step, put the variable #{NuGetID}

Do the same for the rest of the fields.

Let me know how it goes!


Now I got this error:

[07:58:23][Octopus Deploy] Resolving NuGet package versions...
[07:58:23][Octopus Deploy] The version number for step 'Deploy' cannot be automatically resolved because the feed or package ID is dynamic.
[07:58:23][Octopus Deploy] Using version number provided on command-line.
[07:58:23][Octopus Deploy] Release plan for release:    1.0.24
[07:58:23][Octopus Deploy] Steps: 
[07:58:23][Octopus Deploy]   #   Name     Version         Source                              
[07:58:23][Octopus Deploy]   --- -------- --------------- ------------------------------------
[07:58:23][Octopus Deploy]   1   DeployStep   ERROR           Cannot resolve  

Hey guys
I still need your help

Hi Booris,

Sorry for the delay here. I forgot to tell you to add a 3rd variable:

Name value scope
NugetID client.project.debug staging
NugetID client.project.release production
NugetID client.project.debug (No scope)

When Octopus creates the release, it still hasn’t resolved the environment-specific variables, reason why in that error message Octopus cant find any packages. By creating a 3rd variable without a scope, Octopus uses it to create the release(think of this as a placeholder), but once it starts a deployment it fetches the right package for the environment you are deploying to, following your variable-based convention.

Sorry for not telling you about that 3rd variable before. Totally my bad!

Let me know how it goes


Hi Dalmiro

All works fine now. Thank you for your help.