Octopus not getting latest created package from teamcity feed. Get previous package


I have teamcity and octopus deploy working together. for the past few days i noticed one thing that octopus deploy is getting nuget package which was created in last teamcity build. Here is an example. Lets suppose i have a project with name XXX. I have created three build steps for it in teamcity. first for build , second to create octopus release package , this is to deploy package. I clean up both team city and octopus deploy so both are empty.

When i run the first build in Teamcity , it build (1.0.1) the code successfully and when it comes to create octopus release it throw error by saying
"Could not find any packages with ID XXX in the feed http://localhost:888/httpAuth/app/nuget/v1/FeedService.svc/. During build it create the nuget package XXX.1.0.1.nupkg. If i re-run the build this time everything will run successfully but in octopus deploy its using XXX.1.0.1.nupkg instead of XXX.1.0.2.nupkg. XXX.1.0.2.nupkg is most latest package.


Thanks for getting in touch! I am very sorry about the delay in getting back to you, I just found this trapped in our spam filter.
The answer to your question (if you have not already found the solution) is that Team City does not release packages to its own repository until after all build steps are completed.
So your create release build step needs to be in its own build configuration.
We have a video that explains this in more detail: http://octopusdeploy.com/learn/videos
Under Team city the video “TeamCity in-built feed” is the correct one.


We’re experiencing the same problem, although using separate build configurations.

See screenshots. We are unsure if this is a problem with teamcity or octopus

teamcity 9.0.2

Hi Ivar,

I can’t see anything wrong with the information that you have provided.
Are you able to supply for me the create-release command you are using, and a screenshot of your project process (showing feed name and package name).
Please feel free to obscure the server name and API key. Those details I don’t need to see just everything else in the create-release line.


Vanessa, take a look at the attached file “build-log.png” . Is that what you’re looking for?

It seems to me that either teamcity or octopus is caching the rss feed, causing the “create release” to not find the latest nuget package created in teamcity

Hi Ivar,

The image just does not have your full command with project name and any other variables, I need to see the whole command. The image is both cut off and doesn’t give the detail I need.
I also need the screenshot of your projects process.


I’m having somewhat of a similar issue. I build my project in TeamCity and I’m using the TeamCity Nuget feed. Octopus was at one point last week showing the latest package in the feed when I go to create a release. If I click on search for a specific release, it shows up.

Why is the Latest release column in Octopus now showing any values? See attache screenshot.

To follow up with my previous comment, if I hit F5 enough times, I will start to see the latest release flash and then disappear. Eventually I got it to show up and stay. See attached screenshot.

Seems like there is a timing or caching issue with getting the latest result from the TeamCity NuGet feed.

Hi Callon,

We don’t really cache anything in this case. When you view the feed in the library tab, and test the feed, is it ever slow to results?
Is your TC server on the same server as OD, or could there be any connectivity issues between either?


Hi Venessa,

When I look at my TeamCity feed in the library tab, the results are fast.

Yes, our TeamCity server (and feed) is on the same server as Octopus Deploy.


Hi Callon,

There is no reason that is should behave so slowly.
Are you able to install Fiddler http://www.telerik.com/fiddler and check the response times on the release creation page.
Let me know what you find.


UPDATE - Ok I found the issue for why those resources were not found. Those process steps were configured to look at a different NuGet feed and not at TeamCity. This was a recent change. After fixing them, everything shows up correctly.


I’ having the same issue again. I’ve run the fix raven db command from the server. I’ve also restarted the TeamCity and Octopus services. Finally I restarted the machine. No effect, same issue.

I’ve attached screenshots highlighting the issue. When I go do create my release, it tells me it can’t find the latest release, but the previous release is the same version.

Selecting the previous version (which is the same as the latest release) and then proceeding, the next step tells me it still can’t find the resource.

Finally I go to the Tasks area and click on the feeds and test the TeamCity Feed and instantly I get the results I expect.

How can I resolve this?

Hi Callon,

That is great you were able to find the cause, it would have been a hard one for us to help you troubleshoot without knowing those kinds of details.


Hi Vanessa,

I was also having issues similar to getting latest package, but related to version number using API. I can’t figure out why Octopus Deploy API is getting the wrong VersionNumber, i already specified no-cache HTTP request headers, and even called twice to make sure it won’t get the previous value, but to no avail.

The inconsistencies happen when Octopus Deploy started the Promote Release from TeamCity. I first call the API to get the latest version number, since we need realtime information coming from Octopus Deploy. This first step already has an issue with the retrieval of VersionNumber, as compared to the dashboard telling us. How can we resolve this issue?

I believe when we call API, it should return the most-recent values, and not the previous value. I attached a screenshot for this matter.

Reference Octopus API discussion thread: http://help.octopusdeploy.com/discussions/questions/2619-get-currently-deployed-production-release

Hope to get response from you soon.

Thank you!


Hi Vanessa,

To add more context, the version taken by Octopus Deploy was done was last 4 deployment action from TeamCity. I was wondering if this is related to the scheduled deployment we setup? Apparently, we have a 2-hour interval for scheduled deployment to DEV, it uses the same package if there are no changes made since last deployment. You will notice that we got 2 instances of deployed Maybe the API is recognizing this instead of the most-recent deployed? See screenshot attached for the deployment history for DEV.


Hi Lester,

It looks like your TeamCity script is calling promote-release with some arguments. But two important arguments are missing:

  • A project name should be getting passed
  • A from environment and to environment should be passed

The promote-release task is pretty simple - it takes the latest deployed release of project A in environment X, and deploys it to environment Y. Without these arguments I’m not sure why.

Since you have a specific version number, you should probably use the “Deploy release” runner instead of “Promote release” - the “Deploy release” runner lets you specify the specific version to deploy.

Hope this helps,


Hi Paul,

I agree, however, I’m talking about the API dashboard not getting the latest package. Promote-Release task was having the correct parameters. Yes, there are cases that Promote-Release not promoting the latest package from previous environment (possibly because the current deployment for the previous environment was not yet done or still in progress).

We used Promote-Release to prevent deploying the “in-progress” latest deployment from the previous environment.

Here’s the sample API dashboard URL I used to call to get the information I need:


I recalled reading your product documentation that RavenDB may not get the latest information after finishing deployments. Are there ways to get the latest information via API? (See my first post regarding this.)


Ahh, thanks for the clarification. We have an open bug report with Octopus 3.0 in which the /api/dashboard can return the wrong deployments.



Is this bug fixed? We are creating releases manually from Octopus due this release. Can you please confirm?

De Silva

Hi De Silva,

Please track the issue for updates. When it is fixed and released it will have a milestone and be updated.