while using
nuget.exe push \\share\Packages\*.nupkg -Source "https://myvsts.pkgs.visualstudio.com/_packaging/tcpcm/nuget/v3/index.json" -ApiKey VSTS
i got an
Response status code does not indicate success: 409 (Conflict).
error
is there a way to overwrite all packages that have already been uploaded?
To resolve this issue, the only way is that upload the packages with a new version. ok thanks for the info, what i now did was to upload all packages to source code and then create a build definition for nuget push.
Update a package. In Solution Explorer, right-click either References or the desired project, and select Manage NuGet Packages.... (In web site projects, right-click the Bin folder.) Select the Updates tab to see packages that have available updates from the selected package sources.
Set up Visual Studio Select NuGet Package Manager, and then select Package Sources. Enter the feed's Name and Source URL, and then select the green (+) sign to add a new package source. If you enabled upstream sources in your feed, clear the nuget.org checkbox. Select OK when you are done.
Open Visual Studio, go to Tools -> NuGet Package Manager -> Package Manager Settings menu. Click Clear All NuGet Cache(s) button in options dialog then clearing process is started. Once NuGet cache location is cleared, click ok button.
is there a way to overwrite all packages that have already been uploaded?
The simple answer is No. Jonathan Myers`s answer pointed out the correct 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.
That because many package clients, including NuGet, keep a local cache of packages on your machine. Once a client has cached a particular package@version
, it will return that copy on future install/restore requests. If, on the server, you replace package@version
(rev 1) with a new package@version
(rev 2), the client is unable to tell the difference. This can lead to indeterminate build results from different machines.
So we could not overwrite all packages that have already been uploaded, even we could not delete them and re-uploaded. To resolve this issue, the only way is that upload the packages with a new version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With