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!