Cannot deploy to Octopus Deploy from TeamCity

I’m creating a Nuget package with TeamCity and when I try and push it to Octopus Deploy I get the following error:

The step ‘Get package’ provides the release version number but no package version could be determined from it.cannot push package to octpus deploy

I don’t understand what I’m doing wrong. TeamCity is successfully creating a Nuget package with the current version set using Octopack.

I found in the end the issue was that TeamCity wasn’t publishing to Octopus’s NuGet feed.

In the end I changed Octopus Deploy to point at the TeamCity NuGet feed and that worked as expected.

Of note the TeamCity NuGet feed gets populated mid build these days so you don’t need to use a different build target in TeamCity to call the ‘Create release’ step in Octopus.