Problem
I'm attempting to install a package from a public repository. I want to use the PackageSource External
. This is a Azure DevOps Artifacts Feed that is configured with NuGet Gallery as an Upstream source
. Since NuGet Gallery is an upstream source, my request for a package should pass through Artifacts and be fulfilled by the Upstream source, but instead it errors and says that there's no match.
On the other hand, if I submit the same request using a PackageSource that is pointing directly to NuGet Gallery, it works. Could the Upstream source functionality in Artifacts be broken?
Package sources
[D:\MySandboxes\TFS\Development\DevOps\]
>Get-PackageSource
Name ProviderName IsTrusted Location
---- ------------ --------- --------
Microsoft Visual Studio Offli... NuGet False C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
Internal NuGet False http://azuredevops/Development/_packaging/Internal/nuget/v3/index.json
External NuGet False http://azuredevops/Development/_packaging/External/nuget/v3/index.json
MyNuGet NuGet False https://www.nuget.org/api/v2
PSGallery PowerShellGet False https://www.powershellgallery.com/api/v2
Installing package with Azure DevOps Artifacts package source (fails)
[D:\MySandboxes\TFS\Development\DevOps\]
>Install-Package Resta.UriTemplates -Source External -Destination "."
Install-Package : No match was found for the specified search criteria and package name 'Resta.UriTemplates'. Try Get-PackageSource to see all available registered package sources.
At line:1 char:1
+ Install-Package Resta.UriTemplates -Source External -Destination "."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Installing package with NuGet Gallery package source (succeeds)
[D:\MySandboxes\TFS\Development\DevOps\]
>Install-Package Resta.UriTemplates -Source MyNuGet -Destination "."
The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'MyNuGet'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "No"): a
Name Version Source Summary
---- ------- ------ -------
Resta.UriTemplates 1.3.0 MyNuGet .NET implementation of the URI template spec (RFC6570). Supports up to level 4 template expressions.