Skip to content

Update dependency packages - #2072

Merged
alerickson merged 4 commits into
masterfrom
updateMajorVersions
Oct 27, 2026
Merged

alerickson merged 4 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.

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.

Adapt publishing to NuGet 7’s required allowInsecureConnections parameter, preserving existing support for registered HTTP repositories and add the Boolean -AllowInsecureConnection parameter to Publish-PSResource, allowing users to control whether publishing to HTTP NuGet repositories is permitted while preserving the default value of false. This parameter was added due to a new parameter, allowInsecureConnections being added to PushRunner.Run(), which comes the NuGet.Commands package. Documentation on this can be found here: https://learn.microsoft.com/en-us/nuget/consume-packages/nuget-https-everywhere#allowing-insecure-http-feeds-opt-out

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).

@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).

@alerickson
alerickson merged commit d9fdae7 into master Oct 27, 2026
12 checks passed
@alerickson
alerickson deleted the updateMajorVersions branch October 27, 2026 23:19
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.

3 participants