oneget: NuGet.exe finds packages that PackageManagment\Find-Package does not
Here is the configuration:
I have SonaType Nexus OSS hosting my NuGet feed for PowerShell Modules and Scripts. The Anonymous user only has read rights to root of the nuget repo, this was configured to allow publishing via NuGet and prevent the prompting of credentials which stops PowerShellGet\Publish-Module from working (LINK). Now, i can publish a module no problem that i have made, it is called UFPI-Utility, this module contains helper functions that are used by other modules. Now, when i try to publish a module that depends on UFPI-Utility, it was failing. And it was failing because when it does it lookup for dependent module, it fails because its not passing the PSCredenital object do the lookup (I have submitted a Pull Request to PowerShellGet to fix this part).
Now, i went to publish a script that requires the top level module which requires UFPI-Utility, and it says it fails to find the top level module, which is called UFPI-SCCM. So the order goes like this:
ControllerScript.ps1 -> Requires UFPI-SCCM Module -> Requires UFPI-Utility Module
Now, as i dug in, and ran a search using the nuget.exe, it finds the UFPI-SCCM module:
C:\Users\XXXXXX\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet> .\NuGet.exe list UFPI -source http://XXXXXX:8081/repository/ufpigallery/
Please provide credentials for: http://XXXXXX:8081/repository/ufpigallery/
UserName: XXXXXX
Password: ***********
UFPI-SCCM 0.1.1
UFPI-Utility 0.1.0
However, using Find-Module it only finds one module:
C:\Users\XXXXXX\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet> Find-Module -Repository UFPIGallery-Test -Credential (Get-Credential) -Name UFPI*
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
Version Name Repository Description
------- ---- ---------- -----------
0.1.0 UFPI-Utility UFPIGallery-Test PowerShell Module that contains custom functions...
So this totally prevents me from Publishing the script, or even installing the one module. After going over the PowerShellGet module, it seems like this issue is with the PackageManagment\Find-Package cmdlet more so then the PowerShellGet\Find-Module
Let me know if there is anymore info i can give, because we would really like to use this in house, but this frankly is a show stopper.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 16 (6 by maintainers)
IMO this bug needs to be prioritized… fresh install of Win10,
Find-Package -Provider Nuget 'NewtonSoft*'should find a bunch of packages, but finds none.The inability to use modules that depend on other modules via Nexus’s NuGet repo is a showstopper for using powershell repositories at my work.
The latest recommended nuget.exe client is 4.1.0 https://www.nuget.org/downloads. I mean, seems like getting of V2 should defiantly be a priority. I mentioned back on February 27th, that V4 was already an RC.