Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Powershell "Find-Package" has problems with v3-Feed on ProGet
-
Hello,
I have problems getting information with PowershellFind-Package
on a NuGet-Feed hosted on ProGet. My Feed named "Common_Develop" ha a connector to https://api.nuget.org/v3/index.json. When I sendFind-Package
to nuget.org directly everything works fine. As soon as I send the same request to the local ProGet feed that has a connector to nuget.org I get errors because something with the JSON object schema is not as expected. Changing the the source URI to use ODATA (v2) instead of JSON-LD (v3) fixes the problem. But the first try withFind-Package
against nuget.org uses JSON-LD (v3) and works fine.
So my question is: What is wrong with the Feed on ProGet using the connector to nuget.org?
Is this a bug with ProGet Version 2022.17 (Build 15) or do I have to change something with the feed configuration?For error reproduction my powershell:
PS C:\Users\digiov> $PsVersionTable Name Value ---- ----- PSVersion 7.3.1 PSEdition Core GitCommitId 7.3.1 OS Microsoft Windows 10.0.19044 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0 PS C:\Users\digiov> Find-Package -Name System.IO -Source https://api.nuget.org/v3/index.json Name Version Source Summary ---- ------- ------ ------- System.IO 4.3.0 https://api.nuget.org/v3/index.… Provides base input and output (I/O) types, including System.IO.Stream, System.IO.StreamReader and Sys… PS C:\Users\digiov> Find-Package -Name System.IO -Source https://ProGet/nuget/Common_Develop/v3/index.json WARNING: An internal error occurred: The JSON object returned by the NuGet API does not match expected schema. Expected property: 'type'. Check the debug stream for the full JSON object dump. Find-Package: No match was found for the specified search criteria and package name 'System.IO'. Try Get-PackageSource to see all available registered package sources. PS C:\Users\digiov> Find-Package -Name System.IO -Source https://ProGet/nuget/Common_Develop/ Name Version Source Summary ---- ------- ------ ------- System.IO 4.3.0 https://ProGet/nuget/Common_De.… Provides base input and output (I/O) types, including System.IO.Stream, System.IO.StreamReader and Sys…
-
I was able to reproduce the issue. Please give me a bit of time to dig into this further to determine what is causing it.
Thanks,
Rich
-
This is a known bug (#430) in
Find-Package
; basically this only works with NuGet.org, and doesn't work with other repositories.I would suggest replying to the issue; it's been a few years since anyone commented on the bug, so bumping it miiiiiight get Microsoft to consider fixing it.
Cheers,
Alana
-
Hello Rich and Alana,
thank you for your effort.
I wrote my problem as a reminder to the open issue https://github.com/OneGet/oneget/issues/430.
We will see what happensKind regards,
Rosario