Update NuGet Packages#6258
Conversation
JohnMcPMS
left a comment
There was a problem hiding this comment.
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.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
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 |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
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 |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
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 |
## 📖 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>
📖 Description
Updates NuGet package versions in
src\Directory.Packages.propsto 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:
coverlet.collectorMicrosoft.ApplicationInsightsMicrosoft.AspNet.WebApi.ClientMicrosoft.Extensions.HostingMicrosoft.NET.Test.SdkMicrosoft.PowerShell.SDKMicrosoft.Windows.SDK.ContractsNewtonsoft.JsonnunitNUnit3TestAdapterOctokitSemverSystem.Data.SqlClientSystem.Text.Jsonxunitxunit.runner.visualstudioYamlDotNetWhy This Helps
🔒 Security Improvements
Updated packages include security fixes from:
Microsoft.ApplicationInsights3.1.2 (includes OpenTelemetry security advisory fixes)Microsoft.Extensions.Hosting10.0.8 (carries .NET 10.0.8 servicing releases with security fixes)System.Text.Json10.0.8 (aligned with .NET 10.0.8 servicing)📝 Additional Changes
System.Text.Jsonpackage reference tosrc\WinGetUtilInterop.UnitTests\WinGetUtilInterop.UnitTests.csproj✅ Checklist
📋 Issue Type
Created with copilot assistance