Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-7699

downloading specific versions of NuGet packages via Visual Studio package manager console fails

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.11.1, 3.0.0-m3
    • 2.10
    • NuGet
    • None
    • 3
    • Sprint 31

    Description

      Download of older versions of NuGet packages using the Visual studio NuGet package manager console doesn't work unless the packages are already cached in Nexus.

      PM> Install-Package -Id Google.ProtocolBuffers -Version 2.3.0.277
      Install-Package : Unable to find version '2.3.0.277' of package 'Google.ProtocolBuffers'.
      At line:1 char:16
      + Install-Package <<<< -Id Google.ProtocolBuffers -Version 2.3.0.277
      + CategoryInfo : NotSpecified: ( [Install-Package], InvalidOperationException
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

      This fails. But then download it directly into Nexus via GET request:

      curl http://localhost:8081/nexus/service/local/nuget/nugroup/Google.ProtocolBuffers/2.3.0.277 > /dev/null

      After this the download from PM works:

      PM> Install-Package -Id Google.ProtocolBuffers -Version 2.3.0.277
      Installing 'Google.ProtocolBuffers 2.3.0.277'.
      Successfully installed 'Google.ProtocolBuffers 2.3.0.277'.
      Adding 'Google.ProtocolBuffers 2.3.0.277' to SonatypeNexusCSharp.
      Successfully added 'Google.ProtocolBuffers 2.3.0.277' to SonatypeNexusCSharp.

      The query which fails (and then succeeds) is:

      http://localhost:8081/nexus/service/local/nuget/nugroup/Packages%28Id=%27Google.ProtocolBuffers%27,Version=%272.3.0.277%27%29

      Attachments

        Activity

          People

            mprescott Michael Prescott
            rseddon Rich Seddon
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              tigCommentSecurity.panel-title