PSResourceGet
PSResourceGet copied to clipboard
Better Support for Nuget Dependencies for Binary Modules
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).
As the owner of the SQLServer module and due to my close proximity to the Microsoft.Data.SqlClient folks, I really hope to see this addressed soon. :)
This made me move away from Powershell for almost everything. I code now everything with more than a few lines completely in C#. I would prefer to have generic .net dlls/nuget packages and use PowerShell for the Business Logic
What's the best practice workaround to this issue?