From 642e4b82ab162a3ec1aea2e484858921815922fc Mon Sep 17 00:00:00 2001 From: Vladimir Pecanac Date: Sun, 30 Aug 2026 21:26:33 +0200 Subject: [PATCH] PasswordHasher: retarget net10.0, fix the benchmark project's absolute HintPath - All three projects move from net8.0 to net10.0. - PasswordHasher.Benchmark.Tests referenced Microsoft.Extensions.Identity.Core through an absolute Windows HintPath pinned to SDK 8.0.4, so it built on one machine only. Replaced with , which is how a non-web project reaches Identity.Core. - Package lifts, all read from NuGet on 2026-08-30: Microsoft.AspNetCore.OpenApi 8.0.4 -> 10.0.11, Swashbuckle.AspNetCore 6.4.0 -> 10.2.3, BenchmarkDotNet 0.13.12 -> 0.15.8, NUnit 3.14.0 -> 4.6.1, NUnit3TestAdapter 4.5.0 -> 6.3.0, NUnit.Analyzers 3.9.0 -> 4.14.0, Microsoft.NET.Test.Sdk 17.8.0 -> 18.9.0, coverlet.collector 6.0.0 -> 10.0.1. The tests already use the constraint model (Assert.That), so the NUnit 3 to 4 move needed no assertion rewrites. - One comment in CustomerService.Login() saying the sample ignores the SuccessRehashNeeded signal deliberately. Build 0 errors and 8/8 tests pass on SDK 10.0.302 / runtime 10.0.10. --- .../PasswordHasher.Api/PasswordHasher.Api.csproj | 6 +++--- .../PasswordHasher.Api/Services/CustomerService.cs | 1 + .../PasswordHasher.Benchmark.Tests.csproj | 8 +++----- .../PasswordHasher.Tests/PasswordHasher.Tests.csproj | 12 ++++++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/authorization-dotnet/PasswordHasher/PasswordHasher.Api/PasswordHasher.Api.csproj b/authorization-dotnet/PasswordHasher/PasswordHasher.Api/PasswordHasher.Api.csproj index 34cf43e40d..48da60e9c0 100644 --- a/authorization-dotnet/PasswordHasher/PasswordHasher.Api/PasswordHasher.Api.csproj +++ b/authorization-dotnet/PasswordHasher/PasswordHasher.Api/PasswordHasher.Api.csproj @@ -1,14 +1,14 @@ - net8.0 + net10.0 enable enable - - + + diff --git a/authorization-dotnet/PasswordHasher/PasswordHasher.Api/Services/CustomerService.cs b/authorization-dotnet/PasswordHasher/PasswordHasher.Api/Services/CustomerService.cs index 075b708594..0b66cf5ff3 100644 --- a/authorization-dotnet/PasswordHasher/PasswordHasher.Api/Services/CustomerService.cs +++ b/authorization-dotnet/PasswordHasher/PasswordHasher.Api/Services/CustomerService.cs @@ -36,6 +36,7 @@ public LoginResult Login(LoginRequest request) switch (verificationResult) { case PasswordVerificationResult.Success: + // This sample deliberately ignores the rehash signal: code calling IPasswordHasher directly must rehash and save the password itself. case PasswordVerificationResult.SuccessRehashNeeded: return LoginResult.Success; default: diff --git a/authorization-dotnet/PasswordHasher/PasswordHasher.Benchmark.Tests/PasswordHasher.Benchmark.Tests.csproj b/authorization-dotnet/PasswordHasher/PasswordHasher.Benchmark.Tests/PasswordHasher.Benchmark.Tests.csproj index f19ffa36d2..adcf5c3d3b 100644 --- a/authorization-dotnet/PasswordHasher/PasswordHasher.Benchmark.Tests/PasswordHasher.Benchmark.Tests.csproj +++ b/authorization-dotnet/PasswordHasher/PasswordHasher.Benchmark.Tests/PasswordHasher.Benchmark.Tests.csproj @@ -2,19 +2,17 @@ Exe - net8.0 + net10.0 enable enable - + - - C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\8.0.4\Microsoft.Extensions.Identity.Core.dll - + diff --git a/authorization-dotnet/PasswordHasher/PasswordHasher.Tests/PasswordHasher.Tests.csproj b/authorization-dotnet/PasswordHasher/PasswordHasher.Tests/PasswordHasher.Tests.csproj index 9e67f3e18e..b0e8d9b024 100644 --- a/authorization-dotnet/PasswordHasher/PasswordHasher.Tests/PasswordHasher.Tests.csproj +++ b/authorization-dotnet/PasswordHasher/PasswordHasher.Tests/PasswordHasher.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 enable enable @@ -11,11 +11,11 @@ - - - - - + + + + +