Skip to content

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

Merged
brunobritodev merged 4 commits into
masterfrom
feat/net10
Nov 18, 2026
Merged

brunobritodev merged 4 commits into
masterfrom
feat/net10

Conversation

@brunobritodev

Copy link
Copy Markdown
Member

Summary

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

Breaking change (release 10.0.0)

  • Targets net10.0 only. netstandard2.1, net8.0 and net9.0 were removed. Consumers who need them stay on 9.x.
  • The public API did not change.

Security

  • The netstandard2.1 target depended on ASP.NET Core 2.1 packages with high severity advisories: Microsoft.AspNetCore.Http 2.1.1, Newtonsoft.Json 10.0.1 and System.Security.Cryptography.Xml 4.5.0. Dropping that target removes all of them.
  • ⚠️ Found while doing this: NetDevPack.Security.Jwt 10.0.0 (the version on nuget.org) depends on System.Security.Cryptography.Xml/Pkcs 10.0.12, which now have high severity advisories. The tests and samples here pin 10.0.15 through Central Package Management transitive pinning until NetDevPack.Security.Jwt 11 (feat!: target .NET 10 only Security.Jwt#81) ships. The JwtExtensions package itself does not depend on them.

Dependencies

  • Central Package Management (Directory.Packages.props). NuGet Audit with NU1901-NU1904 as errors. Added global.json, .editorconfig and Dependabot.
  • Microsoft.AspNetCore.Authentication.JwtBearer 10.0.15, System.IdentityModel.Tokens.Jwt 8.23.0.
  • Samples and tests: the stale NetDevPack.Security.Jwt.Core 8.2.2 package ID is no longer published. It was replaced by NetDevPack.Security.Jwt 10.0.0, and the other Security.Jwt packages are on 10.0.0.

Tests

  • xunit 2 (deprecated) → xunit.v3 on Microsoft.Testing.Platform. FluentAssertions → AwesomeAssertions. Fixed the xUnit1051 warnings.
  • ApiTests (the test host) no longer targets net6/net7/net8/net9.

CI

  • actions/checkout@v7 and actions/setup-dotnet@v6, with the SDK taken from global.json.
  • The publish workflow now runs the tests. It didn't before.
  • The PR workflow checks for vulnerable packages.
  • semantic-release action v4 (semantic-release 24; it was 19.0.5). Pack and push run only when a new release is published. Symbols are pushed, and the assembly version matches the release.

Housekeeping

  • README.MD → README.md. The csproj packs README.md, and file names are case-sensitive on Linux runners.
  • RepositoryBranch was main and is now master.

Test plan

  • dotnet build -c Release: 0 errors. The remaining warnings already existed (CS1591, nullable, obsolete WebHostBuilder in the test host).
  • dotnet test -c Release: 4/4 passed
  • dotnet list package --vulnerable --include-transitive: no vulnerable packages
  • dotnet pack: a single net10.0 group (JwtBearer 10.0.15, IdentityModel 8.23.0), README and icon included

Follow-up

  • When NetDevPack.Security.Jwt 11 is published, bump it here and remove the two transitive pins.
  • The test suite is small (4 tests). The test host still uses the obsolete WebHostBuilder.

- Target net10.0 only; drop netstandard2.1 (pulled vulnerable ASP.NET Core 2.1
  packages: Microsoft.AspNetCore.Http 2.1.1, Newtonsoft.Json 10.0.1,
  System.Security.Cryptography.Xml 4.5.0), net8.0 and net9.0; tests drop net6/net7
- Central Package Management, NuGet Audit as errors, global.json, .editorconfig, dependabot
- JwtBearer 10.0.15, System.IdentityModel.Tokens.Jwt 8.23.0
- Samples/tests: stale NetDevPack.Security.Jwt.Core 8.2.2 replaced by
  NetDevPack.Security.Jwt 10.0.0; pin patched System.Security.Cryptography.Xml/Pkcs
- Tests: xunit.v3 on Microsoft.Testing.Platform, AwesomeAssertions, fix xUnit1051
- CI: actions/checkout v7, setup-dotnet v6, publish now runs the tests,
  vulnerable package check, semantic-release 24, pack/push only on new release
- Rename README.MD to README.md (the package references README.md; case matters on Linux)
- Fix RepositoryBranch (master)

BREAKING CHANGE: the package now targets .NET 10 only. Stay on 9.x for
.NET Standard 2.1, .NET 8 or .NET 9. The public API did not change.
Each test created its own JWKS server (new keys), while the API under test is a
class fixture that reads JWKS_URL once and AuthMiddleware cached the first token
in a static field. Results depended on test order, which changed with xunit.v3
and fails on Linux CI.
nuget.org API keys expire and the org key already did, which made the
last releases fail with 403. Publish with NuGet/login (OIDC) instead:
the job gets a short-lived key from the trusted publishing policy for
this repository and workflow file.

Also adds a workflow_dispatch input to publish an existing release tag
again, since re-running the job skips the push once the release exists.
@brunobritodev

Copy link
Copy Markdown
Member Author

Added NuGet trusted publishing (OIDC) to the publish workflow, since the org API key expired. Same change as NetDevPack/NetDevPack#71: NuGet/login@v1 + id-token: write, plus a workflow_dispatch input to publish an existing release tag again.

@brunobritodev
brunobritodev merged commit 6779aee into master Nov 18, 2026
1 check passed
@brunobritodev
brunobritodev deleted the feat/net10 branch November 18, 2026 02:11
github-actions Bot pushed a commit that referenced this pull request Nov 18, 2026
## [10.0.0](v9.0.1...v10.0.0) (2026-11-18)

### ⚠ BREAKING CHANGES

* the package now targets .NET 10 only. Stay on 9.x for
.NET Standard 2.1, .NET 8 or .NET 9. The public API did not change.

* ci: use conventionalcommits release preset

* test: share the JWKS server across the test class

Each test created its own JWKS server (new keys), while the API under test is a
class fixture that reads JWKS_URL once and AuthMiddleware cached the first token
in a static field. Results depended on test order, which changed with xunit.v3
and fails on Linux CI.

* ci: publish to NuGet with trusted publishing

nuget.org API keys expire and the org key already did, which made the
last releases fail with 403. Publish with NuGet/login (OIDC) instead:
the job gets a short-lived key from the trusted publishing policy for
this repository and workflow file.

Also adds a workflow_dispatch input to publish an existing release tag
again, since re-running the job skips the push once the release exists.

### Features

* target .NET 10 and update dependencies ([#8](#8)) ([6779aee](6779aee))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 10.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