Skip to content

Drop net6.0 and net7.0 TFMs, keep net8.0+ and netstandard2.x #4786

@thomhurst

Description

@thomhurst

Problem

TUnit currently targets netstandard2.1/net6.0+ with conditional compilation for different runtime capabilities. Both net6.0 (Nov 2024) and net7.0 (May 2024) are out of support.

Carrying these unsupported TFMs means maintaining #if branches for runtime features that exist in net8.0 but not net6.0/net7.0 (e.g. FrozenDictionary, improvements to UnsafeAccessor).

Proposed Change

  • Drop net6.0 and net7.0 target frameworks
  • Keep net8.0+ as the minimum modern .NET target
  • Keep netstandard2.0 / netstandard2.1 for .NET Framework compatibility (still in support)
  • Simplify #if blocks from net6.0 vs net7.0 vs net8.0 branches to netstandard vs net8.0+
  • Enable net8.0+ features unconditionally on the modern path (e.g. FrozenDictionary, FrozenSet, SearchValues<T>)

Notes

  • Breaking for anyone running TUnit on net6.0 or net7.0 — they'd need to upgrade to net8.0
  • .NET Framework users are unaffected (covered by netstandard targets)
  • Deferred to v2

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingv2Deferred to v2 release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions