This repository was archived by the owner on Jun 13, 2024. It is now read-only.
  
  
  - 
                Notifications
    
You must be signed in to change notification settings  - Fork 134
 
    This repository was archived by the owner on Jun 13, 2024. It is now read-only.
  
  
Install-Package fails on package with only prerelease versions #695
Copy link
Copy link
Open
Description
Prerequisites
- Write a descriptive title.
 - Make sure you are able to repro it on the latest version
 - Search the existing issues.
 
Steps to reproduce
D:\ Find-Package Azure.Communication.Email -Source nuget.org -AllowPrereleaseVersions -AllVersions
Name                           Version          Source           Summary
----                           -------          ------           -------
Azure.Communication.Email      1.0.0-beta.2     nuget.org        This client library enables working with the Microsoft Azure Communication Ema…
Azure.Communication.Email      1.0.0-beta.1     nuget.org        This client library enables working with the Microsoft Azure Communication Ema…
D:\ Install-Package  -AllowPrereleaseVersions -Name "Azure.Communication.Email"
Install-Package: No match was found for the specified search criteria and package name 'Azure.Communication.Email'. Try Get-PackageSource to see all available registered package sources.
D:\ Install-Package  -AllowPrereleaseVersions -Name Azure.Communication.Email
Install-Package: No match was found for the specified search criteria and package name 'Azure.Communication.Email'. Try Get-PackageSource to see all available registered package sources.
D:\ Install-Package  -AllowPrereleaseVersions -AllVersions -Name Azure.Communication.Email
WARNING: 'Azure.Communication.Email' matched package 'Azure.Communication.Email/1.0.0-beta.2' from provider: 'NuGet', source 'nuget.org'.
WARNING: 'Azure.Communication.Email' matched package 'Azure.Communication.Email/1.0.0-beta.1' from provider: 'NuGet', source 'nuget.org'.
Install-Package: Unable to install, multiple packages matched 'Azure.Communication.Email'. Please specify an exact -Name and -RequiredVersion.
D:\ Install-Package  -AllowPrereleaseVersions -AllVersions -Name Azure.Communication.Email -RequiredVersion "1.0.0-beta.2"
Install-Package: No match was found for the specified search criteria and package name 'Azure.Communication.Email'. Try Get-PackageSource to see all available registered package sources.```
### Expected behavior
```console
One of the Install-Package commands above should succeed.Actual behavior
All of the Install-Package commands fail.Error details
D:\ Find-Package Azure.Communication.Email -Source nuget.org -AllowPrereleaseVersions -AllVersions
Name                           Version          Source           Summary
----                           -------          ------           -------
Azure.Communication.Email      1.0.0-beta.2     nuget.org        This client library enables working with the Microsoft Azure Communication Ema…
Azure.Communication.Email      1.0.0-beta.1     nuget.org        This client library enables working with the Microsoft Azure Communication Ema…
D:\ Install-Package  -AllowPrereleaseVersions -Name "Azure.Communication.Email"
Install-Package: No match was found for the specified search criteria and package name 'Azure.Communication.Email'. Try Get-PackageSource to see all available registered package sources.
D:\ Install-Package  -AllowPrereleaseVersions -Name Azure.Communication.Email
Install-Package: No match was found for the specified search criteria and package name 'Azure.Communication.Email'. Try Get-PackageSource to see all available registered package sources.
D:\ Install-Package  -AllowPrereleaseVersions -AllVersions -Name Azure.Communication.Email
WARNING: 'Azure.Communication.Email' matched package 'Azure.Communication.Email/1.0.0-beta.2' from provider: 'NuGet', source 'nuget.org'.
WARNING: 'Azure.Communication.Email' matched package 'Azure.Communication.Email/1.0.0-beta.1' from provider: 'NuGet', source 'nuget.org'.
Install-Package: Unable to install, multiple packages matched 'Azure.Communication.Email'. Please specify an exact -Name and -RequiredVersion.
D:\ Install-Package  -AllowPrereleaseVersions -AllVersions -Name Azure.Communication.Email -RequiredVersion "1.0.0-beta.2"
Install-Package: No match was found for the specified search criteria and package name 'Azure.Communication.Email'. Try Get-PackageSource to see all available registered package sources.Environment data
D:\ $PSVersionTable
Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
D:\ Get-PackageSource
Name                             ProviderName     IsTrusted  Location
----                             ------------     ---------  --------
nuget.org                        NuGet            True       https://api.nuget.org/v3/index.json
PSGallery                        PowerShellGet    False      https://www.powershellgallery.com/api/v2
D:\ Get-PackageProvider
Name                     Version          DynamicOptions
----                     -------          --------------
NuGet                    3.0.0.1          Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrerelease…
PowerShellGet            2.2.5.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate…Version
7.3.3
Visuals
No response
Metadata
Metadata
Assignees
Labels
No labels