Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nuget remove older version *also* unlists current version #551

Closed
skysgh opened this issue Jul 16, 2012 · 2 comments
Closed

nuget remove older version *also* unlists current version #551

skysgh opened this issue Jul 16, 2012 · 2 comments

Comments

@skysgh
Copy link

skysgh commented Jul 16, 2012

Hi just came across something else.

If the current version of an assembly is -- eg. 0.0.553 -- and I issue commands to delete/unlist previous versions (ie all versions up to 0.0.530), then I would expect to still see listed those in between 0.0.530 and 0.0.553

What I get instead is the following:

) SIgn in to Nuget
*) Go check My Packages
*) I see the assembly XAct.Core
*) BUT:
*) I see *all
versions now listed under "Unlisted"
*) With versions up to 0.0.530 marked as Listed=No
*) With versions between 0.0.530 and current version marked as Listed=Yes, but under "Unlisted"

That said, although listed under "Unlisted", the latest version is still downloadable. That at least is good news, or this whole office would grind to a halt.

Thanks for looking into this!

PS: The account in question is "xact", and one of the assemblies that shows this behaviour is "XAct.Core" (although just about any "XAct.xxx" one will show this behaviour).

PPS: As for how I was deleting the older assemblies, the script I used to cleanup my old assemblies is listed below, but as far as I can tell from the documentation of the delete command, there is no reason that Deleting older version should also unlist the whole package.

Powershell script used to mass unlist assemblies up to certain version:

$xml = xml;
$packageNodes = $xml.SelectNodes("/packages/package");

$packageNameList = New-Object "System.Collections.ObjectModel.Collection[System.String]"
foreach ($_ in $packageNodes) { $packageNameList.Add($_.innerText)}

Write-Host("....");

foreach($package in $packageNameList){
Write-Host ($package);

$i=50;
$iMax=530;
$apiKey="...........";

While ($i -le $iMax)
{
c:\ProgramFiles\Nuget\Nuget delete $package 0.0.$i -ApiKey $apiKey -NoPrompt
$i +=1;
}

}

referring back to a file of the following format:

<?xml version="1.0"?>
<packages>
  <package>XAct.Collections</package>
  <package>XAct.Configuration</package>
  <package>XAct.Core</package>
  <package>XAct.Data</package>
  <package>XAct.Data.Db</package>
  <package>XAct.Dependency.K2.Client</package>
  <package>XAct.Diagnostics.Log4Net</package>
  <package>XAct.EnterpriseLibrary</package>
  <package>XAct.Data.Db.EF</package>
  ...
 etc.
  ...
@skysgh
Copy link
Author

skysgh commented Jul 16, 2012

In case it helps, images to go with the previous post:

https://www.dropbox.com/sh/hx9n12ivkavolsl/rqcjDmVYit

@howarddierking
Copy link
Contributor

We've unlisted packages both manually and by way of our own PS scripts and have not seen this behavior - if you can provide a repro that isolates the NuGet-specific issues from possible script-specific issues, we'll be happy to take another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants