Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Response status code does not indicate success: 409 Conflict - The feed already contains

I am changing my Azure DevOps build to .NET Core.

It's all working except the final push step to get the package in my feed, I get this error:

Response status code does not indicate success: 409 (Conflict - The feed already contains 'mypackage 1.0.x' (Devops Activity ID: xxx))

In the old "Nuget Push" step there was an option to "Allow duplicates to be skipped", specifically to get around this problem - but this option is not available in the "dotnet push" step.

How can this be achieved in the dotnet core world?

like image 500
TomFp Avatar asked Oct 22 '18 16:10

TomFp


1 Answers

This can be accomplished by dividing the process into Build and Release, because the the job in the release pipeline support skipping upload if a package with the same name and version already exists.

Build pipeline

Add a build with the following steps enter image description here Publish the compiled nupkg file as output of the build.

enter image description here

Release pipeline

Create a release pipeline connected to the build pipeline. Click Alow duplicated to be skipped. enter image description here

like image 144
Mathias Rönnlund Avatar answered Nov 02 '22 05:11

Mathias Rönnlund