Skip to content

Drop netstandard2.0 target, support net8.0+ only #161

@LeeCampbell

Description

@LeeCampbell

Summary

Drop netstandard2.0 from the main library's target frameworks, retaining only net8.0;net9.0;net10.0.

Previous NuGet releases will remain available for consumers on .NET Framework or older .NET Core runtimes.

Motivation

  • net8.0 is the current LTS floor. .NET 6 and 7 are already end-of-life. net8.0 as the lowest target is standard practice.
  • Performance. This is an instrumentation library where performance matters. The netstandard2.0 code path uses a slower, lookup-table-based LeadingZeroCount instead of the hardware intrinsic (BitOperations.LeadingZeroCount).
  • Simplification. Removing netstandard2.0 eliminates conditional compilation and dead code paths.
  • Legacy users are covered. Previously published NuGet packages remain available for anyone who needs netstandard2.0 support.

Scope of changes

  • HdrHistogram.csproj — Remove netstandard2.0 from <TargetFrameworks>, remove the netstandard2.0 PropertyGroup condition.
  • Utilities/Bitwise.cs — Remove #if NET5_0_OR_GREATER guards and the entire Bitwise.Imperative class. Use BitOperations.LeadingZeroCount unconditionally.
  • HistogramLogReader.cs — Remove #if NETSTANDARD2_0 block (line ~243), keep the modern StartsWith(char) overload.
  • spec/tech-standards/build-system.md — Update target framework documentation.

Acceptance criteria

  • Library targets net10.0;net9.0;net8.0 only
  • No #if NETSTANDARD or #if NET5_0_OR_GREATER conditional compilation remains
  • Bitwise.Imperative class is removed
  • All tests pass on net8.0, net9.0, and net10.0
  • Build system spec updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions