PowerShell / PowerShell/PSResourceGet

Install-Package support

Open
#487 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature_request
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Summary of the new feature / enhancement

From what I understated this module suppose to eventually replace PackageManagement and PowerShellGetv2
In https://github.com/OneGet/oneget it states that This module is currently not in development. The PowerShell/PowerShellGet repository is actively in development as the new PowerShell package manager.

So what are the replacements for *-Package Cmdlets? I tried the following:

Register-PSResourceRepository -Name 'nuget.org' -URL 'http://www.nuget.org/api/v2'

Find-PSResource -Name MailKit -Repository nuget.org
# Returns package info like MailKit 2.15.0.0 etc.

Install-PSResource -Name Microsoft.NETCore.Platforms -Repository nuget.org -Verbose
# [Error] Install-PSResource: Module manifest file: ...\Microsoft.NETCore.Platforms.psd1 does not exist. This is not a valid PowerShell module.

So repository installed and searched successfully but installing is blocked.

The other problem is the "dependency loop"
As reported here https://github.com/OneGet/oneget/issues/475 Install-Package cannot actually work on most of the packages without -SkipDependencies as it resolves dependencies incorrectly and will return loop error without it. The last statement in this issue is:

@GehanPanapitiya hopefully it will be addressed in new PowerShellGet v3

But Install-PSResource doesn't have -SkipDependencies and the loop bug here is worst as it's not even detected:

Install-Package -Name MailKit -Verbose
# [Error] Install-Package: Dependency loop detected for package 'MailKit'.

# This works
Install-Package -Name MailKit -SkipDependencies -Verbose

# This will hang forever (probably spamming the repo with request in a loop?)
Install-PSResource -Name MailKit -Repository nuget.org -Verbose
# Loops silently forever?

So what is the plan/roadmap on this? Will packages be supported on Install-PSResource or some new commend? As PackageManagement is not developed it will probably will never be fixed there.

Proposed technical implementation details (optional)

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the reported Install-PSResource and Install-Package behavior, including the MailKit and Microsoft.NETCore.Platforms command examples and the linked OneGet dependency-loop issue. Determine whether package installation, dependency-loop handling, and a replacement for -SkipDependencies are in scope; done would require an agreed roadmap or implementation plan, which the issue does not yet define.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.