Open awickham10 opened 5 years ago
That's odd. I can't reproduce the problem myself. It might be that you have an old build of packagemanagement or the PowerShellGet packageprovider loaded. Does it still repro if you open a fresh powershell prompt? What do Get-PackageProvider and Get-Module PackageManagement say? (without the ListAvailable)
I also wasn't able to repro this
I recently ran into this issue. After installing the latest PowershellGet and then closing and restarting my posh console, it was cleared up..
I dont mean to raise the dead here, but thought i had some info that might be helpful:
I installed powershellget 2.2.5 from PSGallery and started having the issue once i started using -SkipAutomaticTags When not using -SkipAutomaticTags, the probelm would go away but i would be stuck publishing modules with the automatically generated tags. This behavior seemed really odd so i started investigating.
I think i found ultimately where this is coming from
the issue is on line 169 in PSModule.psm1:
$script:AllowPrereleaseVersions = "AllowPrereleaseVersions"
on my system, changing it to:
$script:AllowPrereleaseVersions = "AllowPrerelease"
fixed it for me
and after some further digging, I confirmed that in addition to PackageManagment version 1.4.7 i had 1.0.0.1 installed on my system.
After removing PackageManagment module version 1.0.0.1 and reverting the above lines back to original, I am no longer having the problem.
I would still consider this a bug as ideally the module should #require / load /reference the appropriate dependencies minimum versions to prevent dependency mixmatches from presenting to end users. Though I understand if this is more deemed a "user error" issue.
Perhaps a documentation blurb somewhere to let users know to remove the old packagemanagement module from their system if plannng to use this module would be sufficient, forgive me if this already exists and I just didnt find it.
@chreestopher I think I know what the issue was here. If you run Get-Module PowerShellGet, PackageManagement -ListAvailable
you get a list of all of the versions that exist on your system. If there's multiple versions installed in different locations then the ordering that is displayed with this output is the ordering PowerShell uses. Meaning, version 1.0.0.1 may have been installed in a location that was a higher priority than 1.4.7.
For example, here PowerShellGet version 2.0.0 would be loaded by default. You would need to explicitly import version 2.2.5 or remove 2.0.0 so that 2.2.5 can be loaded by default.
We can write a blurb somewhere to make sure this info is a bit more explicitly conveyed 😃
2.1.4 seems to have broken -AllowPrerelease. I was able to verify it is working in 2.1.3 and only an issue in 2.1.4.
Steps to reproduce
Expected behavior
Return PSReadline modules.
Actual behavior
Environment data