NuGet publish for existing packages breaks build

j.verdurmen's Avatar

j.verdurmen

02 Dec, 2017 12:03 AM

Since the change with "requires protocol version 4.1.0", AppVeyor seems to fallback to the nuget commend line tool, which doesn't handle existing packages correctly (fails build)

See for example build log: https://ci.appveyor.com/project/nlog/nlog-web/build/4.5.0.697
---
Deploying using NuGet provider
Publishing NLog.Web.4.5.1.nupkg to https://www.nuget.org/api/v2/package...NuGet account requires protocol version 4.1.0 - using NuGet command line tool
Pushing NLog.Web.4.5.1.nupkg to 'https://www.nuget.org/api/v2/package'...
  PUT https://www.nuget.org/api/v2/package/
  Conflict https://www.nuget.org/api/v2/package/ 940ms
ERROR: Response status code does not indicate success: 409 (A package with ID 'NLog.Web' and version '4.5.1' already exists and cannot be modified.).
NuGet exited with code 1
---

The 409 should be ignored, as discussed at https://help.appveyor.com/discussions/problems/1767-nuget-deploy-failing

Current result:
- deploy of existing package results in 409 and stops build/publish. Other packages won't be deployed!

Excepted result:
- ignore the 409 status

  1. Support Staff 1 Posted by Ilya Finkelshte... on 02 Dec, 2017 02:42 AM

    Ilya Finkelshteyn's Avatar

    You are right, it should be fixed soon, please watch https://github.com/appveyor/ci/issues/1845

  2. 2 Posted by j.verdurmen on 03 Dec, 2017 01:05 AM

    j.verdurmen's Avatar

    OK, but can in the meanwhile the bug get fixed? a 409 now breaks the build!

    It breaks releases in some repos, as I have multiple packages and not all of them will be updated (so 409 -> breaks build/publishing)

  3. Support Staff 3 Posted by Ilya Finkelshte... on 05 Dec, 2017 03:16 AM

    Ilya Finkelshteyn's Avatar

    Fix is already checked-in. After some due diligence it should be in production, this week.

  4. Support Staff 4 Posted by Ilya Finkelshte... on 06 Dec, 2017 07:22 PM

    Ilya Finkelshteyn's Avatar

    Should be good now.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac