Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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

    Scheduled Pinned Locked Moved Support
    4 Posts 3 Posters 15 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rosario.digiovanni_1930
      last edited by

      Hello,
      I have problems getting information with Powershell Find-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 send Find-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 with Find-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…
      
      
      1 Reply Last reply Reply Quote 0
      • rhessingerR Offline
        rhessinger inedo-engineer
        last edited by

        Hi @rosario-digiovanni_1930,

        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

        Products Engineer, Inedo

        atrippA 1 Reply Last reply Reply Quote 0
        • atrippA Offline
          atripp inedo-engineer @rhessinger
          last edited by

          Hi @rosario-digiovanni_1930

          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

          1 Reply Last reply Reply Quote 0
          • R Offline
            rosario.digiovanni_1930
            last edited by

            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 happens 😃

            Kind regards,
            Rosario

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation