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

Attempting to install "InvokeBuild" package from powershell gallery fails with "Unable to install, multiple modules matched" error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.20.1
    • Fix Version/s: None
    • Component/s: NuGet
    • Labels:

      Description

      1. Set up a NuGet proxy repository with remote of https://www.powershellgallery.com/api/v2/
      2. Add that proxy to a group repository (nothing else should be in the group).
      3. Attempt to installĀ InvokeBuild from powershell

      Observe that this fails with error:

      Register-PackageSource -Name SlmPSGallery http://192.168.1.78:8081/repository/psgallery-group-salliemae/ -ProviderName PowerShellGet
      
      Name                             ProviderName     IsTrusted  Location
      ----                             ------------     ---------  --------
      SlmPSGallery                     PowerShellGet    False      http://192.168.1.78:8081/repository/psgallery-group-sal...
      
      
      install-module -Name InvokeBuild -Repository SlmPSGallery -Scope CurrentUser
      WARNING: 'InvokeBuild' matched module 'InvokeBuild/3.6.3' from provider: 'PowerShellGet', repository 'SlmPSGallery'.
      WARNING: 'InvokeBuild' matched module 'InvokeBuild/5.5.7' from provider: 'PowerShellGet', repository 'SlmPSGallery'.
      PackageManagement\Install-Package : Unable to install, multiple modules matched 'InvokeBuild'. Please specify an exact
      -Name and -RequiredVersion.
      At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
      + ...          $null = PackageManagement\Install-Package @PSBoundParameters
      +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidArgument: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], E
         xception
          + FullyQualifiedErrorId : DisambiguateForInstall,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
      

      Now try the same install using a package source configured with remote URL of https://www.powershellgallery.com/api/v2/. That will succeed with no error.

      Expected: The install should work the same way through the Nexus Repo proxy as it does when going directly to the proxy repository's remote.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              rseddon Rich Seddon
              Last Updated By:
              Rich Seddon
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title