List all available versions of a specific package in NuGet Package Manager Console

前端 未结 3 1394
孤城傲影
孤城傲影 2021-01-31 07:13

What NuGet PowerShell command will return a list of all versions of a specific package?

I have tried the following, but it only returns one version of NUnit along with a

3条回答
  •  余生分开走
    2021-01-31 07:55

    As of version 3.x, get-package -ListAvailable -AllVersions will still work, but will issue the following warning about imminent deprecation:

    This Command/Parameter combination has been deprecated and will be removed in the next release. Please consider using the new command that replaces it: 'Find-Package [-Id] -AllVersions'.

    In addition, Find-Package supports an -ExactMatch switch which will avoid the wildcard matching issues that -Filter has:

    Find-Package NUnit -AllVersions -ExactMatch -Source https://api.nuget.org/v3/index.json

提交回复
热议问题