Reputation: 18464
I am using Find-Package from Powershell 5.0. I need to query for pre-release packages. Is this possible?
I am aware that I can fall back to using nuget.exe list -prerelease
if necessary.
Upvotes: 1
Views: 568
Reputation: 984
In Powershell you have to use the command "-AllowPrereleaseVersions" as documented here:
Here is the hint on the differences betweeen PackageManager in Visual Studio and in Powershell: https://learn.microsoft.com/de-de/nuget/reference/ps-reference/ps-ref-find-package
Version 3.0+; this topic describes the command within the Package Manager Console in Visual Studio on Windows. For the generic PowerShell Find-Package command, see the PowerShell PackageManagement reference.
Upvotes: 0
Reputation: 5004
According to the nuget powershell documentation there is the -IncludePreRelease
option:
Find-Package [Id] [-Source ] [-First ] [-Skip ] [-AllVersions] [-IncludePrerelease] [-ExactMatch]
Test:
PM> Find-Package Microsoft.AspNet.Identity.EntityFramework -Exact Microsoft.AspNet.Identity.Entity... {2.2.1}
PM> Find-Package Microsoft.AspNet.Identity.EntityFramework -Exact -IncludePreRelease Microsoft.AspNet.Identity.Entity... {3.0.0-rc1-final}
Upvotes: 0
Reputation: 18464
It appears that the -AllVersions
parameter will include them.
Upvotes: 1