PowerShell / PowerShellGetv2

PowerShellGet is the Package Manager for PowerShell
https://www.PowerShellGallery.com
MIT License
431 stars 138 forks source link

Find-DSCResource returns no results on internal PSRepository #184

Closed AurimasNav closed 6 years ago

AurimasNav commented 6 years ago

Expected Behavior

Find-DSCResource -Repository "internalPSrepository" should return a list of all DSC resources available in the internal PS repository

Current Behavior

returns no results

Possible Solution

Steps to Reproduce (for bugs)

  1. Register-PSRepository -Name InternalPSGallery -SourceLocation https://www.myget.org/F/com/api/v2 -PublishLocation https://www.myget.org/F/com/api/v2/package
  2. Save-Module -repository PSGallery -name xExchange -path C:\temp
  3. Publish-Module -Path C:\temp\xExchange -Repository InternalPSGallery -NuGetApiKey myapikey
  4. Find-DSCResource -Repository InternalPSGallery (also tested with jfrogs artifactory nuget repository)

    Context

    we are trying to setup internal "psgallery" and would like to have Find-DSCResource working just for convenience of searching DSC resources without knowing the module name beforehand.

    Your Environment


> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.14393.1770
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1770
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

> Get-Module
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Add-Member, Add-Type, Clear-Variable, Compare-Object...}
Script     1.1.7.0    PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-Pack...
Script     1.5.0.0    powershellget                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCap...
Script     1.2        PSReadline                          {Get-PSReadlineKeyHandler, Get-PSReadlineOption, Remove-PS...
> Get-Module -ListAvailable PowerShellGet,PackageManagement
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.1.7.0    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script     1.5.0.0    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
> Get-PackageProvider
Name                     Version          DynamicOptions
----                     -------          --------------
msi                      3.0.0.0          AdditionalArguments
msu                      3.0.0.0
NuGet                    2.8.5.210        Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag...
PowerShellGet            1.5.0.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, ...
Programs                 3.0.0.0          IncludeWindowsInstaller, IncludeSystemComponent
> Get-PackageProvider -ListAvailable
Name                     Version          DynamicOptions
----                     -------          --------------
ChocolateyGet            1.0.0.1          AdditionalArguments
msi                      3.0.0.0          AdditionalArguments
msu                      3.0.0.0
nuget                    2.8.5.208
NuGet                    2.8.5.210        Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag...
PowerShellGet            1.5.0.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, ...
PowerShellGet            1.0.0.1
Programs                 3.0.0.0          IncludeWindowsInstaller, IncludeSystemComponent
bmanikm commented 6 years ago

@complexxL9 Could you please get the output of following two commands from your machine?

Find-Packaage -Source https://www.myget.org/F/com/api/v2 -Provider NuGet -FilterOnTag PSIncludes_DscResource -Verbose -Debug | Format-List * -Force

$ModuleName = 'xExchange' # or replace this with your module name
Find-Packaage -Source https://www.myget.org/F/com/api/v2 -Provider NuGet -Name $ModuleName | Format-List * -Force 
bmanikm commented 6 years ago

@complexxL9 It looks like tag based search is not supported in myget feeds. I have verified this with a custom myget feed.