Skip to content

feat: support .NET 10 and removed .NET6, 7#23

Merged
arika0093 merged 4 commits intomainfrom
feat/support-dotnet10
Oct 2, 2025
Merged

feat: support .NET 10 and removed .NET6, 7#23
arika0093 merged 4 commits intomainfrom
feat/support-dotnet10

Conversation

@arika0093
Copy link
Owner

@arika0093 arika0093 commented Oct 2, 2025

This pull request updates the project to support .NET 10 and removes support for .NET 6 and 7. It updates the SDK and package dependencies accordingly, ensures all workflows use the latest .NET versions, and revises the sample and library projects to target .NET 10. The lock file is regenerated to reflect these changes and to update transitive dependencies.

.NET Version and SDK Updates:

  • Updated all GitHub Actions workflows (release.yaml, release-github.yaml, test.yaml, sample-deploy.yaml) to use .NET 10.x and dropped support for .NET 6.x and 7.x. The sample deploy workflow also updates the setup-dotnet action to v4 and targets 10.0.x. [1] [2] [3] [4]

  • Changed the target framework of the sample project (BlazorLocalTimeSample.csproj) to net10.0.

Library Project and Dependency Management:

  • Updated BlazorLocalTime.csproj to target only .NET 8, 9, and 10 (removing 6 and 7), and added a new item group for .NET 10 package references. [1] [2]

  • Regenerated packages.lock.json to remove .NET 6 and 7 dependencies, add .NET 10 dependencies, and update transitive dependencies to their latest versions, including Nerdbank.GitVersioning and others. [1] [2] [3]

Summary by CodeRabbit

  • New Features
    • Added support for .NET 10 across the library, sample app, and CI workflows.
  • Chores
    • Dropped support for .NET 6 and .NET 7.
    • Updated CI to use the latest .NET setup action and SDK matrices.
  • Tests
    • Expanded test targets to include .NET 10.
    • Relaxed test dependency version ranges for improved compatibility.

@coderabbitai
Copy link

coderabbitai bot commented Oct 2, 2025

Walkthrough

The changes upgrade .NET targets and SDKs across workflows and projects to include 10.x/net10.0, remove net6/net7, and adjust dependencies accordingly. Test infrastructure updates include relaxed package ranges and modified Public API approval generation to exclude assembly attributes and drop framework-version discriminators.

Changes

Cohort / File(s) Summary of changes
CI/CD Workflows
.github/workflows/release-github.yaml, .github/workflows/release.yaml, .github/workflows/sample-deploy.yaml, .github/workflows/test.yaml
Updated setup-dotnet matrices to add 10.x; removed 7.x/6.x where present. In sample-deploy, actions/setup-dotnet bumped from v3 to v4 and SDK from 9.0.x to 10.0.x. No other workflow steps changed.
Project Target Frameworks
example/BlazorLocalTimeSample/BlazorLocalTimeSample.csproj, src/BlazorLocalTime/BlazorLocalTime.csproj, tests/BlazorLocalTimeTest.Nls/BlazorLocalTimeTest.Nls.csproj, tests/BlazorLocalTimeTest/BlazorLocalTimeTest.csproj
Upgraded TFMs: sample to net10.0; library to net8.0;net9.0;net10.0 (removed net6.0/net7.0); tests added net10.0. Adjusted per-TFM package references; added net10.0 RC packages for ASP.NET/Extensions.
Dependency Lockfile
src/BlazorLocalTime/packages.lock.json
Regenerated for net10.0; broad dependency updates to 10.0.0-rc.1.* packages; removed older 6.x/7.x entries; updated graphs and content hashes.
Public API Approval Tests
tests/BlazorLocalTimeTest/PublicApiCheckTest.cs, tests/BlazorLocalTimeTest/Approvals/PublicApiCheckTest.Run.approved.txt, tests/BlazorLocalTimeTest/Approvals/PublicApiCheckTest.Run.net8.approved.txt
Public API generator now called with IncludeAssemblyAttributes=false; removed version discriminator logic and helper; approval baselines updated/removed accordingly, including metadata lines.
Test Infrastructure Versions
tests/Directory.Build.props
Relaxed package versions to major-band ranges: Microsoft.NET.Test.Sdk 17., bunit 1., xunit.runner.visualstudio 3.*.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant T as Test Runner
  participant G as PublicApiGenerator
  participant A as ApprovalFiles

  T->>G: GeneratePublicApi(options: IncludeAssemblyAttributes=false)
  note over G: No per-.NET discriminator in filenames
  G-->>T: Produced API text (sans assembly attrs)
  T->>A: Compare with approved baseline
  alt Match
    A-->>T: Test passes
  else Mismatch
    A-->>T: Test fails (diff reported)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I thump my paw—new tens arrive, hurrah!
Pipelines hop to fresher SDK straw.
APIs trimmed, approvals neat,
RC carrots make builds sweet.
With nets re-spun and tests in line,
I nibble bytes—release on time. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly conveys the primary change of adding .NET 10 support while removing .NET 6 and 7, directly reflecting the updates across workflows and project files described in the PR objectives. It is concise, specific, and clearly relates to the main purpose of the changeset.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/support-dotnet10

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@arika0093 arika0093 marked this pull request as ready for review October 2, 2025 13:10
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef4fbce and 4fdccc2.

📒 Files selected for processing (13)
  • .github/workflows/release-github.yaml (1 hunks)
  • .github/workflows/release.yaml (1 hunks)
  • .github/workflows/sample-deploy.yaml (1 hunks)
  • .github/workflows/test.yaml (1 hunks)
  • example/BlazorLocalTimeSample/BlazorLocalTimeSample.csproj (1 hunks)
  • src/BlazorLocalTime/BlazorLocalTime.csproj (2 hunks)
  • src/BlazorLocalTime/packages.lock.json (7 hunks)
  • tests/BlazorLocalTimeTest.Nls/BlazorLocalTimeTest.Nls.csproj (1 hunks)
  • tests/BlazorLocalTimeTest/Approvals/PublicApiCheckTest.Run.approved.txt (1 hunks)
  • tests/BlazorLocalTimeTest/Approvals/PublicApiCheckTest.Run.net8.approved.txt (0 hunks)
  • tests/BlazorLocalTimeTest/BlazorLocalTimeTest.csproj (1 hunks)
  • tests/BlazorLocalTimeTest/PublicApiCheckTest.cs (1 hunks)
  • tests/Directory.Build.props (1 hunks)
💤 Files with no reviewable changes (1)
  • tests/BlazorLocalTimeTest/Approvals/PublicApiCheckTest.Run.net8.approved.txt
🔇 Additional comments (10)
example/BlazorLocalTimeSample/BlazorLocalTimeSample.csproj (1)

3-3: Verify .NET 9 packages work with net10.0 target.

The sample project targets net10.0 but references .NET 9.x packages (Microsoft.AspNetCore.Components.WebAssembly 9.0.4 and DevServer 9.0.9). While this is typically acceptable during the .NET 10 RC period, confirm these packages are compatible with the net10.0 target framework to avoid runtime issues.

Also applies to: 9-12

tests/Directory.Build.props (1)

10-13: LGTM! Wildcard versions reduce lock file churn.

Relaxing test dependency version constraints to wildcards (17., 1., 3.*) is appropriate for test projects and reduces maintenance overhead when supporting multiple target frameworks.

src/BlazorLocalTime/BlazorLocalTime.csproj (2)

3-3: LGTM! Target framework update aligns with PR objectives.

The removal of net6.0 and net7.0 and addition of net10.0 correctly implements the stated PR goals. Supporting net8.0, net9.0, and net10.0 provides appropriate coverage for a library.


22-28: Confirm RC packages for net10.0 target

net10.0 group references RC packages (10.0.0-rc.1, go-live; GA on Nov 11 2025); ensure publishing a library with pre-GA dependencies aligns with your release policy or consider waiting for the final release.

tests/BlazorLocalTimeTest/PublicApiCheckTest.cs (2)

13-19: LGTM! Excluding assembly attributes improves multi-TFM testing.

Setting IncludeAssemblyAttributes = false removes framework-specific metadata from the public API surface, which simplifies approval file maintenance when testing across net8.0, net9.0, and net10.0.


20-25: LGTM! Removing version discriminator consolidates approval files.

Dropping the framework-version discriminator from approval file naming consolidates multiple per-TFM approval files into a single file. This reduces maintenance overhead and is appropriate when the public API surface is identical across target frameworks.

tests/BlazorLocalTimeTest/Approvals/PublicApiCheckTest.Run.approved.txt (1)

1-115: LGTM! Approval file correctly reflects assembly attribute exclusion.

The removal of assembly metadata (RepositoryUrl, InternalsVisibleTo, TargetFramework) aligns with the IncludeAssemblyAttributes = false setting in PublicApiCheckTest.cs. The public API surface remains intact and unchanged.

tests/BlazorLocalTimeTest.Nls/BlazorLocalTimeTest.Nls.csproj (1)

3-3: LGTM! Test coverage extended to net10.0.

Adding net10.0 to the target frameworks ensures NLS-specific tests run against all supported .NET versions, consistent with other test projects in the solution.

.github/workflows/test.yaml (1)

27-30: LGTM! CI matrix updated for .NET 10 testing.

Adding 10.x to the dotnet-version matrix ensures tests run against all supported framework versions (8.x, 9.x, 10.x) across all target operating systems, aligning with the project's multi-TFM strategy.

.github/workflows/sample-deploy.yaml (1)

22-24: LGTM! Deployment workflow updated for .NET 10.

Upgrading to actions/setup-dotnet@v4 and targeting 10.0.x correctly aligns the deployment workflow with the sample project's net10.0 target framework.

@arika0093 arika0093 merged commit 387d9df into main Oct 2, 2025
5 checks passed
@arika0093 arika0093 deleted the feat/support-dotnet10 branch October 2, 2025 22:29
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.

1 participant