Skip to content

deps: Update package dependencies #2750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 6, 2025

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Jun 5, 2025

This PR update package dependencies to latest versions.

How to confirms outdated packages

Run following command.

dotnet package list --outdated --project BenchmarkDotNet.sln

List of updated packages

Name From To Description
FSharp.Core 4.6.0 9.0.300
Iced 1.17.0 1.21.0
JetBrains.Profiler.SelfApi 2.5.11 2.5.13
Microsoft.CodeAnalysis.CSharp 4.12.0 4.14.0
Microsoft.Diagnostics.Runtime 1.1.126102 3.1.512801
Microsoft.Diagnostics.Tracing.TraceEvent 3.1.8 3.1.21
Microsoft.NETCore.Platforms 6.0.0 7.0.4
Microsoft.NETFramework.ReferenceAssemblies 1.0.2 1.0.3
Microsoft.NET.Test.Sdk 17.7.2 [17.13.0]
Microsoft.VisualStudio.DiagnosticsHub.BenchmarkDotNetDiagnosers 17.13.35606.1 18.0.36127.1
Newtonsoft.Json 13.0.1 [13.0.1] Use 13.0.1 as baseline package
ScottPlot 5.0.54 5.0.55
System.Configuration.ConfigurationManager 4.5.0 9.0.5
System.Drawing.Common 4.7.2 9.0.5
System.Management 6.0.0 9.0.5
System.Memory 4.5.5 4.6.3
System.Runtime.CompilerServices.Unsafe 6.0.0 6.1.2
System.Threading.Tasks.Extensions 4.5.4 4.6.3
System.ValueType 4.5.0 4.6.1
Verify.Xunit 20.8.2 30.3.1
xunit 2.9.2 2.9.3 Latest version that support .NET Framework 4.6.2
xunit.runner.visualstudio 2.4.1 [2.8.2] Latest version that support .NET Framework 4.6.2

Note

  • BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks project contains legacy targets (.NET461 and netcoreapp2.0) So it need to use xunit.runner.visualstudio v2.4.1 that compatible these frameworks.
  • Microsoft.NET.Test.Sdk 14.0.0 or later depends on NewtonsoftJson 13.0.3. So it can't update versions
  • System.Numerics.Vectors for netstandard2.0 build need to reference 4.5.0 version (that support net461).

Other changes

1. BenchmarkDotNet.Samples.csproj

IntroNativeMemory.cs
Add custom benchmark filter (WindowsOnlyAttribute) to exclude benchmarks that not works on non-Windows OS.
(Because System.Drawing.Common is not supported .NET 6.0 or later)

IntroNuGet.cs
Modify benchmarks to use Newtonsoft.Json 13.0.1 as baseline package.
And add WithCustomBuildConfiguration settings. (It's required when targeting multiple NuGet versions)

2. BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks.csproj

  1. Remove unused warning suppression for NU1901/NU1902/ NU1904 .
  2. Add settings to suppress following NU1510 warnings. (It's occurred when build with .NET 10 SDK)

    NU1510: PackageReference Microsoft.NETCore.App will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary.

3. Remove [UsesVerify] attributes

This attribute is removed on latest xUnit.Verify package.

Additional manual tests

@filzrev filzrev marked this pull request as ready for review June 5, 2025 04:11
@filzrev filzrev force-pushed the deps-update-package-dependencies branch from c0596bb to 10e69fd Compare June 5, 2025 04:18
@filzrev filzrev force-pushed the deps-update-package-dependencies branch from 10e69fd to c57ad52 Compare June 5, 2025 05:14
Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @filzrev !

foreach (var version in targetVersions)
{
AddJob(baseJob.WithNuGet("Newtonsoft.Json", version)
.WithCustomBuildConfiguration(version)
Copy link
Member

Choose a reason for hiding this comment

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

Was the WithCustomBuildConfiguration change required to get it to work? If so, why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed WithCustomBuildConfiguration setting on latest commit.

When I've tested on v0.14.0 based code previously. wrong DLL version are placed on benchmarks bin directory.
But it seems not needed with latest code (that using ArtifactsPath for benchmark project build)

</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<!-- Reference System.Numerics.Vectors 4.5.0 (that support net461) as minimum version to avoid MSB3277 warning -->
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for adding the comment 👍

@adamsitnik adamsitnik merged commit 67664a3 into dotnet:master Jun 6, 2025
10 of 14 checks passed
@AndreyAkinshin AndreyAkinshin added this to the v0.15.1 milestone Jun 7, 2025
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