Skip to content

Update NuGet Packages#6258

Closed
Trenly wants to merge 9 commits into
microsoft:masterfrom
Trenly:NuGet
Closed

Update NuGet Packages#6258
Trenly wants to merge 9 commits into
microsoft:masterfrom
Trenly:NuGet

Conversation

@Trenly

@Trenly Trenly commented May 29, 2026

Copy link
Copy Markdown
Contributor

📖 Description

Updates NuGet package versions in src\Directory.Packages.props to newer supported releases. These updates move the repository onto current package baselines that include accumulated servicing fixes, improve compatibility with newer .NET/runtime toolchains, and reduce long-term maintenance risk from version drift.

📦 Packages Updated

18 NuGet package versions were updated:

Package Old Version New Version
coverlet.collector 3.1.2 10.0.1
Microsoft.ApplicationInsights 2.21.0 3.1.2
Microsoft.AspNet.WebApi.Client 5.2.9 6.0.0
Microsoft.Extensions.Hosting 9.0.6 10.0.8
Microsoft.NET.Test.Sdk 17.3.2 18.6.0
Microsoft.PowerShell.SDK 7.4.12 7.4.16
Microsoft.Windows.SDK.Contracts 10.0.26100.1742 10.0.28000.1839
Newtonsoft.Json 13.0.3 13.0.4
nunit 3.12.0 3.14.0
NUnit3TestAdapter 3.15.1 6.2.0
Octokit 4.0.3 14.0.0
Semver 2.3.0 3.0.0
System.Data.SqlClient 4.9.0 4.9.1
System.Text.Json 9.0.6 10.0.8
xunit 2.4.2 2.9.3
xunit.runner.visualstudio 2.4.5 3.1.5
YamlDotNet 16.3.0 18.0.0

Why This Helps

  • Aligns key dependencies with actively serviced versions used by current SDK/tooling
  • Brings upstream bug fixes from package lines, including reliability fixes in test discovery/execution stacks and runtime/library servicing fixes delivered through newer .NET package trains
  • Improves test framework coverage by upgrading NUnit (3.12.0 → 4.6.1), NUnit3TestAdapter (3.15.1 → 6.2.0), and xunit (2.4.2 → 2.9.3) to modern versions
  • Maintains healthier security posture by updating transitive dependencies

🔒 Security Improvements

Updated packages include security fixes from:

  • Microsoft.ApplicationInsights 3.1.2 (includes OpenTelemetry security advisory fixes)
  • Microsoft.Extensions.Hosting 10.0.8 (carries .NET 10.0.8 servicing releases with security fixes)
  • System.Text.Json 10.0.8 (aligned with .NET 10.0.8 servicing)

📝 Additional Changes

  • Added System.Text.Json package reference to src\WinGetUtilInterop.UnitTests\WinGetUtilInterop.UnitTests.csproj

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

Created with copilot assistance

@JohnMcPMS JohnMcPMS added the Next-Release This PR is waiting for the current release to branch before merging. label May 29, 2026

@JohnMcPMS JohnMcPMS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Things I didn't comment on are probably fine / will have little to no changes required to build. The comments are probably all deserving of their own PR due to the additional changes needed.

Comment thread src/Directory.Packages.props Outdated
Comment thread src/Directory.Packages.props Outdated
Comment thread src/Directory.Packages.props Outdated
@JohnMcPMS

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@Trenly
Trenly marked this pull request as ready for review June 9, 2026 21:24
@Trenly
Trenly requested a review from a team as a code owner June 9, 2026 21:24
@JohnMcPMS

Copy link
Copy Markdown
Member

Looks like the NUnit change would require moving forward the language from 12 to 14. It also causes some ambiguous Assert.Throws calls.

Possibly a transitive effect; appears to introduce a TelemetryEvent to a VS namespace Microsoft.VisualStudio.TestPlatform.ObjectModel that conflicts with our own type.

@JohnMcPMS

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@Trenly
Trenly marked this pull request as draft June 11, 2026 16:29
@Trenly

Trenly commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

I will update this and test again locally once I get home - All the updates had been pworking previously on my machine, so not sure why it's failing here - will investigate

@Trenly
Trenly marked this pull request as ready for review June 15, 2026 20:30
@florelis

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@Trenly

Trenly commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Given the test failures, I'm going to split this into smaller and more targetted PRs rather than trying to take it all at once, especially since these aren't strictly necessary updates

@Trenly Trenly closed this Jun 16, 2026
@Trenly Trenly mentioned this pull request Jun 16, 2026
8 tasks
florelis pushed a commit that referenced this pull request Jul 15, 2026
## 📖 Description

Upgrade the AppInstallerCLIE2ETests suite to NUnit 4 and modernize the
supporting test code to the NUnit 4 constraint model. This lands on the
latest available NUnit 4.x release in NuGet (`4.6.1`)

The update converts the E2E suite off NUnit 3 classic assertions, fixes
the delegate-based assertion overloads required by NUnit 4, and carries
the package version change through the affected test projects that use
centralized package management.

I opted for full migration instead of the simpler
`Directory.Build.props` change as I expect this will be a one-time
migration and I generally believe that using the newer format will be
more performant in the future (plus I had the extra tokens to burn, so
why not)

## 🔗 References

* Split from #6258
* NUnit 4 migration guide:
https://docs.nunit.org/articles/nunit/release-notes/Nunit4.0-MigrationGuide.html

## 🔍 Validation

- Search-based verification confirmed the old NUnit 3 classic assertions
were removed from `src/AppInstallerCLIE2ETests`.

## ✅ Checklist

- [x] Signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com)
- [ ] Linked to an issue
- [x] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable)
- [ ] Updated documentation (if applicable)
- [ ] Updated [Copilot instructions](.github/copilot-instructions.md)
(if build, architecture, or conventions changed)

## 📋 Issue Type

- [ ] Bug fix
- [ ] Feature
- [x] Task

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6287)

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Next-Release This PR is waiting for the current release to branch before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants