Octopack error 400 bad request

On certain packages and using Octopack with TFS MSBuild I am getting a 400 bad request error back.

I am using the built in Octopus NuGet feed.

I am using the Octopack NuGet package within my projects and am using the build arguments to generate and push the package.

This works correctly in a different solution (an MVC web api) but is not working correctly in another (3 svc services).

I can confirm the version numbers are different each build as they are being picked up from TFS versioning (assembly info).
If I use NuGet package explorer I can confirm the version is correct and matches the file name too.

I can see the packages listed in the Octopus library so it looks like they made it up correctly but I am still getting an error back.
I have also tried manually updating one of the packages by uploading directly to the feed via Octopus and that also works correctly.

Is there a way I can debug this issue as it is causing the TFS builds to be marked as a failure? or do you have any suggestions of what might be going on?

It is possible the package is getting published twice? We had something like this where we had 2 solutions that both contained a project that built the same octopack and project a built before project b, then project b would fail because of that one project with a 400 bad request.

Hi Ed,

Thanks for reaching out. Like Corey mentioned (thanks Corey!) Nuget returns an HTTP 400 if it detects that a package with an already existing combination of ID-Version is being uploaded. The package you are seeing on the feed is probably the first package, which was uploaded successfully.

If you want you can attach here your build log and i can give you a hand finding out where on your build process you are uploading the same package twice.

Thanks!

Dalmiro

I found this was down to TFS creating both a release and another build config as part of the build definition.

This was causing the same package to be generated twice which then meant (per your suggestions) the same package was being uploaded to the server twice.

Thanks all for your help