Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSO Build - NuGet Publish 409 Conflict

I get a 409 Conflict for my VSO build definition that packages and publishes to a VSO feed.

So each build run is a failure.

VSO build error

However, the package ends up in the feed.

VSO feed good

Any clue? Thanks.

like image 562
Luke Puplett Avatar asked Apr 15 '16 10:04

Luke Puplett


2 Answers

The error message you see is usually caused by that the VSO feed already has the package which has the same name and version number as the one your are publishing. But according to the second screenshot, the package is been published during the build process. So I'm wondering if the package is published twice during the process. You need to check your build definition to see if the package is been published twice during the build or there are two build definitions doing the same thing at the same time.

Update: You can set "Automatic package versioning" to "Use the build number" and set "Build number format" to "1.2$(Rev:.r)" so that the nuget package version will be 1.2.* and increase after each build. enter image description here

like image 110
Eddie Chen - MSFT Avatar answered Oct 18 '22 03:10

Eddie Chen - MSFT


I was having this same problem. The solution is to add a step at the start of your build that deletes the old .nupkg files. Super easy...

  1. Add delete files step.
  2. Move to start of build.
  3. Set source folder= $(Build.Repository.LocalPath)
  4. Set contents = *.nupkg
  5. Enjoy your new green builds.
like image 26
Sam Avatar answered Oct 18 '22 05:10

Sam