feat: support .NET 10 and removed .NET6, 7#23
Conversation
WalkthroughThe 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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 targetnet10.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 = falseremoves 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 = falsesetting 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.
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 thesetup-dotnetaction to v4 and targets10.0.x. [1] [2] [3] [4]Changed the target framework of the sample project (
BlazorLocalTimeSample.csproj) tonet10.0.Library Project and Dependency Management:
Updated
BlazorLocalTime.csprojto 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.jsonto remove .NET 6 and 7 dependencies, add .NET 10 dependencies, and update transitive dependencies to their latest versions, includingNerdbank.GitVersioningand others. [1] [2] [3]Summary by CodeRabbit