Skip to content

Conversation

caaavik-msft
Copy link
Contributor

This PR does a few things:

  • Resolves all warnings in our .NET projects (excluding those in src/scenarios).
  • Updates the minimum dependency of Microbenchmarks from .NET 4.6.2 to .NET 4.7.2, which allows us to safely target netstandard2.0 in BenchmarkDotNet.Extensions without requiring an additional net462 target.
    • I have removed the net462 job from the yml files, if we need automated .NET Framework runs in the future, we will need to revisit it anyways
  • Enabled nullable for all the projects and updated the code accordingly
  • Disabled NETSDK1138 which was being reported every time because we build for older .NET versions
  • Updated the .NET framework conditioning logic in the MSBuild project files to use the new TargetFramework functions
  • Enabled ProduceReferenceAssembly in the netstandard2.0 projects so that we can have incremental compilation working. Without this, every time a change is made to BenchmarkDotNet.Extensions or Reporting it would recompile Microbenchmarks.

Copy link
Contributor

@xtqqczze xtqqczze left a comment

Choose a reason for hiding this comment

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

Many conditions can be simplified, like in #4977

LoopedBard3
LoopedBard3 previously approved these changes Sep 26, 2025
Copy link
Member

@LoopedBard3 LoopedBard3 left a comment

Choose a reason for hiding this comment

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

Looks good to me, if we want to include the extra cleanup in the MicroBenchmarks.csproj file in this PR, that works for me, or we can do it in another PR.

Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
@xtqqczze xtqqczze mentioned this pull request Oct 1, 2025
@caaavik-msft caaavik-msft merged commit 3b8b76f into dotnet:main Oct 3, 2025
73 of 81 checks passed
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