3

I used the following command in PowerShell which I want to see a list of versions for a specific package, but I get an error.

Find-Package -Name "UmbracoCms" -AllVersions

Find-Package : No match was found for the specified search criteria and package name 'UmbracoCms'. Try Get-PackageSource to see all available registered package sources.

Running Get-PackageSource gives me:

Name                             ProviderName     IsTrusted  Location
----                             ------------     ---------  --------
nuget.org                        NuGet            True       https://api.nuget.org/v3/index.json

What is the problem? Where is my mistake?

I tried to get also for other packages like nunit and get the same thing..

henrycarteruk
  • 12,708
  • 2
  • 36
  • 40
Snake Eyes
  • 16,287
  • 34
  • 113
  • 221
  • Try the API v2 source: find-package -name "UmbracoCms" -AllVersions -Source "https://www.nuget.org/api/v2/" – David Brabant Apr 11 '17 at 10:05
  • Did you try your command before post it ? I tried myself and same error occur – Snake Eyes Apr 11 '17 at 11:01
  • Yep. It works for me. But it doesn't work with v3 API, where I get the same error as yours. – David Brabant Apr 11 '17 at 11:02
  • Well, something funny: the feed link has been butchered in my first comment above. It should be: www.nuget.org/api/v2/, precedeed with https colon slash slash. See nuget feed location here: https://www.nuget.org/ and pick the v2 link. – David Brabant Apr 11 '17 at 11:11
  • Yesh, it works ! Post above comment in answer and I will accept it ! – Snake Eyes Apr 11 '17 at 11:27

1 Answers1

4

You should use nuget feed v2 instead of your nuget feed v3 as your package source.

So, this works:

find-package -name "UmbracoCms" -AllVersions -Source "https://www.nuget.org/api/v2"
David Brabant
  • 41,623
  • 16
  • 83
  • 111