Skip to content

Update dependency packages - #2072

Open
alerickson wants to merge 2 commits into
masterfrom
updateMajorVersions
Open

alerickson wants to merge 2 commits into
masterfrom
updateMajorVersions

Conversation

@alerickson

@alerickson alerickson commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

PR Summary

Update dependencies to the latest stable releases:

  • Upgrade NuGet packages from 6.14.3 to 7.9.0.
  • Upgrade System.Text.Json from 8.0.6 to 10.0.13.
  • Upgrade System.Security.Cryptography.Pkcs from 6.0.5 to 10.0.13.
  • Upgrade Azure.Identity from 1.17.2 to 1.21.0.

Adapt publishing to NuGet 7’s required allowInsecureConnections parameter, preserving existing support for registered HTTP repositories.

Allow newer bundled dependencies to satisfy older version requests. After the package update, Publish-PSResource to a container registry failed with:

FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=10.0.0.3, ...'

Azure.Core and System.Memory.Data are built against System.Text.Json 10.0.0.3, but the module now ships 10.0.0.13. The module's assembly resolver only accepted an exact match on the full assembly name, including the version, so it rejected the newer bundled DLL. PowerShell has no binding redirects for module dependencies, so the load failed. The same mismatch affected other upgraded dependencies, such as Microsoft.Bcl.AsyncInterfaces and Microsoft.Extensions.*.

With the changes in ModuleInitAndCleanup.cs, bundled dependencies are now indexed by simple name instead of full name. A requested assembly is resolved from the bundle when the bundled copy has the same name, the same or a higher version, the same culture, the same public key token. Requests for versions newer than the bundled copy, or with a different public key token, are still rejected. The requesting assembly must still be this module or one of its bundled dependencies, matched exactly as before.

PR Context

PR Checklist

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Major dependency upgrades and assembly packaging changes need build and packaged-module validation across supported PowerShell runtimes.

No open issues 🎉

What changed in this PR

Updates PSResourceGet’s dependencies and packaged assemblies, while preserving publishing support for registered HTTP repositories.

Changes:

  • Upgrades NuGet libraries, Azure.Identity, System.Text.Json, and cryptography dependencies.
  • Updates the assemblies included in the module package.
  • Explicitly allows HTTP connections in the NuGet publish call.
File Description
src/​code/​PublishHelper.cs Preserves HTTP publishing support with the updated NuGet API.
src/​code/​Microsoft.PowerShell.PSResourceGet.csproj Updates dependency versions.
doBuild.ps1 Adds required dependency assemblies and removes System.ValueTuple from packaging.

Review effort: Balanced

@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@alerickson

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants