'Is there a way to skip checking if package exists when publishing artifact to feed?
I have an azure pipeline that at the end creates azure artifacts out of my deliverables. I then publish them to azure feeds so other pipelines can use them.
I have been facing error An unexpected error occurred while trying to push the package. Exit code(17).
Looking at the log I can see it claims The package myPackage 1.0122.0 already exists in myUuidString.
- Is there a way to bypass the check whether the package exists or not ? In other words, is not there a way to overwrite a package in case it exists?
- Is there a way to clear/delete the contents of a feed before publishing?
Could not find neither answer in the docs.
Solution 1:[1]
Is there a way to skip checking if package exists when publishing artifact to feed?
For the Universal Package task, I am farid there is no such way to skip checking if package exists when publishing artifact to feed at this moment.
Unlike the nuget push task, there is currently no such option for the Universal Package task to allow duplicates to be skipped:
Besides, since the document: Understand immutability of packages:
Once you publish a particular version of a package to a feed, that version number is permanently reserved. You cannot upload a newer revision package with that same version number, or delete it and upload a new package at the same version.
So, we could not updalod the same version to the feed.
As workaround, we could publish the package with a new version. And we could add a user voice for the same option Allow duplicates to be skipped on the Github.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Leo Liu-MSFT |

