PowerShell / PowerShell/PSResourceGet

Better Support for Nuget Dependencies for Binary Modules

Open
#381 3 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Port of https://github.com/PowerShell/PowerShell/issues/15588

Summary of the new feature/enhancement

Powershell Package Authoring in C#/.Net is a very unsatisfying task for anything that relies on complex Nuget Packages. As an example: It's nearby impossible to get a package working on Powershell Gallery that relies on the Nuget Package of the SQL Server Driver (Microsoft.Data.SqlClient). I have to reference platform specified dll's somehow and it requires a lot of code just to get that dll working. The SQL Server Module

In addition, as a Powershell package can only have dependencies from PowershellGallery (de-facto), it's common to include the .Net DLLs in the Package, see SqlServer Module for example. If two packages include the same dll's we have a conflict. As an example, the SqlServer Module mentioned uses Newtonsoft.Json which should be fairly common to include.

Proposed technical implementation details

I'd propose to support Nuget Dependencies directly in the Manifest Files (psd1).

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 reading the proposed support for NuGet dependencies in PowerShell module manifest files (psd1), then compare the dependency and DLL handling used by the SqlServer Module. Define how package authors would declare NuGet dependencies and how conflicting .NET DLLs should be resolved; completion requires an agreed design and corresponding implementation and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.