0

I have been working on setting up a DevOps stack (source control, ci, package management) for our powershell modules. I was playing with nexus OSS as a PM solution. I am able to use the Publish-Module cmdlet to add modules to the nuget feed, as well as use Install-Module to install them from the same feed. I started playing around with dependencies, the RequiredModules key in the Module Manifest. And if I put a module in there, then publish it to the nexus (the dependent package needs to published first) it will complete, and I can go to the web interface and see the pkg in the feed, and see the other pkg as a dependency. But when I then use Install-Module I keep getting an error

PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'MyModule'. Try Get-PSRepository to see all available registered module repositories. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.1.1.0\PSModule.psm1:1826 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex ception + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

now, if I remove the required module value from the manifest, it works again. I went ahead and put up ProGet, and I do not have this issue, I can install the main package and the dependent one comes along too. Thanks for any help or ideas!

Rao
  • 20,781
  • 11
  • 57
  • 77
tomohulk
  • 592
  • 2
  • 9
  • 22
  • Side note, I can still use `Install-Module` and install the required module. – tomohulk Oct 19 '16 at 18:30
  • Just set up Klondyke, works as expected as ProGet does. Maybe ill just sue klondyke, seems very light weight. – tomohulk Oct 19 '16 at 19:00
  • 1
    So, here is a little more info on this. If I use the `Publish-Module` and point it to the path rather then the name, it works. Or, if I in the Manifest I use a hashtable of all the info needed `RequiredModules = @(@{ ModuleName = "NeededModule"; ModuleVersion = "1.0"; })` So now I really don't know where the issue lies, but as I said, I don't have this issue with ProGet or Klondyke. – tomohulk Oct 20 '16 at 14:26

0 Answers0