Skip to content

feat!: target .NET 10 and update dependencies - #218

Merged
brunobritodev merged 2 commits into
masterfrom
feat/net10
Nov 17, 2026
Merged

brunobritodev merged 2 commits into
masterfrom
feat/net10

Conversation

@brunobritodev

Copy link
Copy Markdown
Member

Summary

Modernizes Security.PasswordHasher for .NET 10 (LTS). .NET 8 and .NET 9 reached end of support on 2026-11-10.

Review the commits separately:

  1. chore: convert UTF-16 files to UTF-8: 20 files (sources, solution, README) were UTF-16 LE. Git treated them as binary, so there were no diffs, and the README packed into the NuGet packages was UTF-16. Encoding change only.
  2. feat!: target .NET 10 and update dependencies: the actual upgrade.

Breaking change (release 8.0.0)

  • All packages target net10.0 only. Consumers on .NET 8/9 stay on 7.x.
  • Stored hashes from 7.x remain valid. New regression tests cover this (see below).

Dependencies

  • Central Package Management (Directory.Packages.props). The NuGet metadata that was repeated in four csproj files is now in src/Directory.Build.props.
  • Microsoft.Extensions.* 10.0.15, Sodium.Core 1.4.1.
  • Demo: removed Microsoft.VisualStudio.Web.CodeGeneration.Design. It was the source of every vulnerable transitive package (Microsoft.Build.Tasks.Core high, System.Security.Cryptography.Pkcs high, NuGet.* low). The Docker build context is now the repository root, because CPM files live there.
  • NuGet Audit with NU1901-NU1904 as errors. Added global.json, .editorconfig and Dependabot.

Tests

  • xunit 2 (deprecated) → xunit.v3 on Microsoft.Testing.Platform.
  • FluentAssertions 8 (commercial license) → AwesomeAssertions.
  • Removed the unused Moq reference.
  • New StoredHashCompatibilityTests: Argon2id, scrypt, bcrypt $2a$/$2b$/$2y$ and ASP.NET Identity v2/v3 hashes, all generated with 7.1.2. Each one must verify (or return SuccessRehashNeeded for Identity hashes) and must reject a wrong password. Never regenerate these values.

CI

  • actions/checkout@v5 and actions/setup-dotnet@v5, with the SDK taken from global.json.
  • Publish now runs the tests. It did not run them before.
  • The PR workflow checks for vulnerable packages.
  • semantic-release action v4 (semantic-release 24). Pack and push run only when a new release is published.
  • Symbols are pushed: the old workflow passed -n. -p:Version is used, so the assembly version matches the release.
  • RepositoryBranch was main and is now master. ContinuousIntegrationBuild is set only on CI.

Test plan

  • dotnet build -c Release: 0 errors. The only warnings are the existing CS1591 (missing XML docs).
  • dotnet test -c Release: 59/59 passed, including 11 new compatibility tests
  • dotnet list package --vulnerable --include-transitive: no vulnerable packages
  • dotnet pack: four nupkg + snupkg files, net10.0 group only, UTF-8 README, icon included

Follow-up (not in this PR)

  • BCrypt.Net-Core 1.6.0 is an old port. BCrypt.Net-Next is the maintained library. Switching is now safer because the compatibility tests guard existing hashes.

🤖 Generated with Claude Code

brunobritodev and others added 2 commits November 17, 2026 12:22
Source files, the solution and README.md were saved as UTF-16 LE, so git treated
them as binary (no diffs) and the README packed into the NuGet packages was UTF-16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Target net10.0 only (drop net8.0/net9.0, both end of support since 2026-11-10)
- Central Package Management; shared NuGet metadata in src/Directory.Build.props
- NuGet Audit as errors, global.json, .editorconfig, dependabot
- Microsoft.Extensions.* 10.0.15, Sodium.Core 1.4.1
- Demo: drop Microsoft.VisualStudio.Web.CodeGeneration.Design (source of all
  vulnerable transitive packages); Docker build context is now the repo root
- Tests: xunit.v3 on Microsoft.Testing.Platform, AwesomeAssertions instead of
  FluentAssertions 8 (commercial license), remove unused Moq
- Add stored-hash compatibility tests (Argon2id, scrypt, bcrypt 2a/2b/2y,
  ASP.NET Identity v2/v3) generated with 7.1.2
- CI: actions v5, publish now runs the tests, vulnerable package check,
  pack/push only on new release, symbols are pushed, assembly version follows release
- Fix RepositoryBranch (master) and ContinuousIntegrationBuild only on CI

BREAKING CHANGE: packages now target .NET 10 only. Stay on 7.x for .NET 8/9.
Stored hashes from 7.x remain valid.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brunobritodev
brunobritodev merged commit 7ed5417 into master Nov 17, 2026
1 check passed
@brunobritodev
brunobritodev deleted the feat/net10 branch November 17, 2026 15:40
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 8.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant