Skip to content

Removed TimeProvider. - #171

Merged
Johannestegner merged 1 commit into
personnummer:mainfrom
Johannestegner:chore/remove-timeprovider
Nov 11, 2026
Merged

Johannestegner merged 1 commit into
personnummer:mainfrom
Johannestegner:chore/remove-timeprovider

Conversation

@Johannestegner

Copy link
Copy Markdown
Member

This Pull request removes the internally created TimeProvider class (which was used as a drop-in replacement of the official one).
We now add the Microsoft.Bcl.TimeProvider package as a dependency on net48 and netstandard2.1.

Added dependency on Bcl.TimeProvider for net48 and netstandard2.1 (in main project).

Signed-off-by: Johannes Tegnér <johannes@jitesoft.com>
@Johannestegner
Johannestegner marked this pull request as ready for review November 11, 2026 14:21

@rasmusbe rasmusbe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. CI is green on all targets, and since Personnummer.TimeProvider was added after 3.5.1 and never shipped in a release, removing it isn't a breaking change for consumers.

Two small things in Personnummer.csproj:

  1. The comment says "older net versions and netfx", but netstandard2.1 is neither. Something like "Targets without System.TimeProvider (before net8.0)" would match what the condition does. If you'd rather not list the TFMs by name, !$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0')) covers targets added later too.
  2. Microsoft.Bcl.TimeProvider 11.0.0 pulls in Microsoft.Bcl.AsyncInterfaces 11.0.0, plus System.ValueTuple on net48, so consumers on those targets get a slightly larger dependency tree and a higher minimum version of those packages. I'd mention that in the release notes.

@Johannestegner
Johannestegner merged commit 2dc1ed8 into personnummer:main Nov 11, 2026
6 checks passed
@Johannestegner
Johannestegner deleted the chore/remove-timeprovider branch November 11, 2026 14:35
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.

2 participants