Skip to content

feat: upgrade to .NET 10 LTS (#368)#371

Merged
nanotaboada merged 4 commits intomasterfrom
feat/dotnet-10-lts
Feb 9, 2026
Merged

feat: upgrade to .NET 10 LTS (#368)#371
nanotaboada merged 4 commits intomasterfrom
feat/dotnet-10-lts

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Feb 9, 2026

  • 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
  • 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.

Ref:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/containers/10.0/default-images-use-ubuntu

Closes #368

Summary by CodeRabbit

  • Chores

    • Upgraded project to .NET 10 (LTS) and aligned core packages to 10.0.0.
    • Updated Docker base images and CI/CD pipelines to target .NET 10.
    • Added SDK configuration for consistent tooling.
  • Documentation

    • Updated README, AGENTS, and changelog to reflect .NET 10 requirements and a new 1.1.0 release entry.

- 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
@nanotaboada nanotaboada linked an issue Feb 9, 2026 that may be closed by this pull request
11 tasks
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 9, 2026

Walkthrough

Upgrades 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

Cohort / File(s) Summary
CI/CD Workflows
.github/workflows/dotnet-cd.yml, .github/workflows/dotnet-ci.yml, azure-pipelines.yml
Bumped DOTNET_VERSION and .NET SDK setup steps from 8.x → 10.x; added/setup actions/setup-dotnet steps and cache settings in GitHub Actions workflows.
Project SDK & Targets
global.json, src/.../Dotnet.Samples.AspNetCore.WebApi.csproj, test/.../Dotnet.Samples.AspNetCore.WebApi.Tests.csproj
Introduced global.json (sdk.version=10.0.100, rollForward=latestFeature); updated TargetFramework from net8.0net10.0 and bumped related package versions to 10.x.
Docker
Dockerfile
Updated multi-stage base images and metadata labels from .NET 8 → .NET 10; build/run logic unchanged.
Docs & Release Notes
.github/copilot-instructions.md, AGENTS.md, README.md, CHANGELOG.md
Replaced .NET 8 references with .NET 10 across docs; added a new 1.1.0 release entry to CHANGELOG documenting the upgrade and dependency bumps.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

.NET, dependencies

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with 'feat:' prefix, is under 80 characters (35 chars), and clearly describes the main change of upgrading to .NET 10 LTS.
Linked Issues check ✅ Passed All key coding objectives from issue #368 are met: projects target net10.0, dependencies upgraded to .NET 10 versions, Docker/CI-CD updated, and documentation refreshed.
Out of Scope Changes check ✅ Passed All changes directly support the .NET 10 migration goal with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dotnet-10-lts

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.

Copy link
Copy Markdown

@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.

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 | 🟠 Major

The test job is missing the setup-dotnet step.

The build job installs .NET 10 via actions/setup-dotnet, but the test job runs on a fresh ubuntu-latest runner without setting up the SDK. Since each job gets its own runner, the SDK from the build job doesn't carry over. If the runner image doesn't ship with .NET 10 preinstalled, dotnet test will fail.

Add a setup-dotnet step to the test job (same as the build job), 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.1
CHANGELOG.md (1)

169-170: ⚠️ Potential issue | 🟡 Minor

Missing comparison link for v1.1.0-bernabeu and stale [Unreleased] link.

The [unreleased] link still compares against v1.0.0-azteca...HEAD and 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.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 9, 2026

@nanotaboada nanotaboada added dependencies Pull requests that update a dependency file dotnet Pull requests that update .NET code labels Feb 9, 2026
@nanotaboada nanotaboada merged commit 905ee22 into master Feb 9, 2026
11 checks passed
@nanotaboada nanotaboada deleted the feat/dotnet-10-lts branch February 9, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file dotnet Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Upgrade to .NET 10 LTS

1 participant