In version 1.1.7 of PowerShellGet, running "find-module <_module_name_> -AllVersions" returns no results when run against private /internal repositories. It does return all versions when run against the powershell gallery.
Version 1.0.0.1 of PowerShellGet that ships with Powershell 5.1 doesn't have this problem. It returns all versions of a module regardless of which repository it is run against.
Expected Behavior
Running find-module <_module_name_> -AllVersions should return all non-prerelease versions of a module from a repository
Current Behavior
find-module <_module_name_> -AllVersions returns nothing, not even the current version. However, runing find-module <_module_name_> without the "-AllVersions" does return the current version, regardless of the type of repository.
Possible Solution
Steps to Reproduce (for bugs)
Create a file share on local or remote computer.
Register the repository
Create a module and publish it to the repository.
Increment build number an publish to the repository
Run find-module -Repository <_my_repository_> will show the current version
Run find-module -Repository <_my_repository_> -AllVersions returns no results.
Context
We rely on being able to find and install previous versions of modules on occasion if we need to test a previous version of code. With this bug, people who have the latest build of PowerShellGet can't use some of our source code tools.
After investigation, I found that this is a regression in 1.1.7.0 version of PackageManagement. PowerShellGet provider returns the results but PackageManagement core in 1.1.7.0 version doesn't return these results.
From @dheise on February 13, 2018 15:37
In version 1.1.7 of PowerShellGet, running "find-module <_module_name_> -AllVersions" returns no results when run against private /internal repositories. It does return all versions when run against the powershell gallery.
Version 1.0.0.1 of PowerShellGet that ships with Powershell 5.1 doesn't have this problem. It returns all versions of a module regardless of which repository it is run against.
Expected Behavior
Running find-module <_module_name_> -AllVersions should return all non-prerelease versions of a module from a repository
Current Behavior
find-module <_module_name_> -AllVersions returns nothing, not even the current version. However, runing find-module <_module_name_> without the "-AllVersions" does return the current version, regardless of the type of repository.
Possible Solution
Steps to Reproduce (for bugs)
Context
We rely on being able to find and install previous versions of modules on occasion if we need to test a previous version of code. With this bug, people who have the latest build of PowerShellGet can't use some of our source code tools.
Your Environment
Copied from original issue: PowerShell/PowerShellGet#230