feat: upgrade to .NET 10 LTS (#368)#371
Conversation
- Update target framework to net10.0 in all projects - Create global.json to pin .NET 10 SDK version (10.0.100) - Upgrade NuGet packages: - Microsoft.AspNetCore.OpenApi 8.0.23 → 10.0.0 - Microsoft.EntityFrameworkCore.Sqlite 9.0.12 → 10.0.0 - Microsoft.EntityFrameworkCore.Design 9.0.12 → 10.0.0 - Microsoft.VisualStudio.Web.CodeGeneration.Design 9.0.0 → 10.0.0 - Remove redundant Microsoft.Extensions.Configuration.Json package - Update Dockerfile to use .NET 10 SDK and runtime images - Update CI/CD pipelines: - azure-pipelines.yml: .NET 8.x → 10.x - dotnet-ci.yml: .NET 8.0.x → 10.0.x - dotnet-cd.yml: .NET 8.0.x → 10.0.x - Update documentation (README.md, AGENTS.md, copilot-instructions.md) - Regenerate package lock files with .NET 10 compatible dependencies - Update CHANGELOG.md for v1.1.0-bernabeu release
WalkthroughUpgrades the repository from .NET 8 LTS to .NET 10 LTS by updating target frameworks, SDK config, Docker base images, CI/CD workflows, project package versions, and documentation (CHANGELOG, README, agent/copilot guidance). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/dotnet-ci.yml (1)
43-56:⚠️ Potential issue | 🟠 MajorThe
testjob is missing thesetup-dotnetstep.The
buildjob installs .NET 10 viaactions/setup-dotnet, but thetestjob runs on a freshubuntu-latestrunner without setting up the SDK. Since each job gets its own runner, the SDK from thebuildjob doesn't carry over. If the runner image doesn't ship with .NET 10 preinstalled,dotnet testwill fail.Add a
setup-dotnetstep to thetestjob (same as thebuildjob), or merge build and test into a single job.Proposed fix — add SDK setup to the test job
steps: - name: Checkout repository uses: actions/checkout@v6.0.2 + - name: Set up .NET ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v5.1.0 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + cache: true + cache-dependency-path: | + src/Dotnet.Samples.AspNetCore.WebApi/packages.lock.json + test/Dotnet.Samples.AspNetCore.WebApi.Tests/packages.lock.json + - name: Lint commit messages uses: wagoid/commitlint-github-action@v6.2.1CHANGELOG.md (1)
169-170:⚠️ Potential issue | 🟡 MinorMissing comparison link for v1.1.0-bernabeu and stale [Unreleased] link.
The
[unreleased]link still compares againstv1.0.0-azteca...HEADand there's no link definition for[1.1.0 - bernabeu]. Per Keep a Changelog conventions, both should be updated.📝 Proposed fix
-[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.0.0-azteca...HEAD +[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.1.0-bernabeu...HEAD +[1.1.0 - bernabeu]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.0.0-azteca...v1.1.0-bernabeu [1.0.0 - azteca]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/releases/tag/v1.0.0-azteca
…ks (#368) - Add setup-dotnet step to test job for explicit dependency declaration - Update [unreleased] link to compare against v1.1.0-bernabeu - Add comparison link for [1.1.0 - bernabeu] release While CI currently passes due to pre-installed .NET 10 on ubuntu-latest, explicitly declaring the SDK setup ensures future-proof workflows and enables proper dependency caching across both build and test jobs.
- Replace adduser with groupadd/useradd for Ubuntu compatibility - Document base OS change from Debian 12 to Ubuntu 24.04 in CHANGELOG Microsoft changed .NET 10 base images from Debian to Ubuntu, requiring updated user creation commands. This ensures CD pipeline builds successfully when publishing Docker images.
- Add explicit Conventional Commits format with examples - Specify issue number suffix requirement - Include all valid commit types (feat, fix, chore, docs, test, refactor) - Provide concrete example for reference Ensures consistent commit message formatting across all contributions.
641e34a to
9661cd6
Compare
|



Microsoft changed .NET 10 base images from Debian to Ubuntu,
requiring updated user creation commands. This ensures CD pipeline
builds successfully when publishing Docker images.
Ref:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/containers/10.0/default-images-use-ubuntu
Closes #368
Summary by CodeRabbit
Chores
Documentation