Repository navigation
Upgrade to .NET 10 LTS - #6
Merged
Merged
Conversation
.NET 9 reaches end of support in November 2026. .NET 10 is the current LTS release, supported until November 2028. - Target net10.0 in all projects - EF Core, Microsoft.AspNetCore.OpenApi, Mvc.Testing and DependencyInjection.Abstractions 10.0.13 - Add global.json pinning the .NET 10 SDK (10.0.402, latestFeature) and use it in CI - Docker images: sdk:10.0 and aspnet:10.0; exclude frontend/ and docs/ from the build context - Add a CI job that builds the Docker image and smoke tests the container (health, migrations via demo reset, overview) - README: .NET 10, Docker usage and CI description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The project targets .NET 9, which reaches end of support on 10 November 2026. After that date there are no security updates for the runtime, ASP.NET Core or EF Core 9. The Dockerfile used the
9.0images, the SDK version was not pinned (noglobal.json), and the Docker build was never validated in CI.Solution
Target framework:
net9.0→net10.0in all six projects. .NET 10 is LTS and supported until 14 November 2028.Packages (aligned with runtime 10.0.13):
Microsoft.EntityFrameworkCore,.Sqlite,.Design9.0.21 → 10.0.13Microsoft.AspNetCore.OpenApi9.0.21 → 10.0.13Microsoft.AspNetCore.Mvc.Testing9.0.21 → 10.0.13Microsoft.Extensions.DependencyInjection.Abstractions10.0.7 → 10.0.13Swashbuckle.AspNetCore10.2.3 supports net10 (Swagger UI verified), and xunit 2.9.2, the test SDK and coverlet all run on net10.SDK: a new
global.jsonpins SDK 10.0.402 withrollForward: latestFeature. CI reads the version from it (global-json-file) instead of9.0.x.Docker:
sdk:9.0/aspnet:9.0→sdk:10.0/aspnet:10.0.frontend/anddocs/are excluded from the build context because the image only contains the API.New CI job,
docker:/healthPOST /api/demo/reset, which applies EF Core migrations inside the containerNothing is pushed to any registry.
README: .NET 10, a "Run the API with Docker" section and the Docker job in the CI description. "Docker support" was removed from Future improvements because it already existed.
No application code changed. The upgrade required no code changes and produced no new compiler or analyzer warnings.
Test results
Locally with SDK 10.0.402:
Migrations and functionality:
dotnet ef migrations has-pending-model-changes(EF Core 10.0.13 tool) → "No changes have been made to the model since the last migration."/health,/swagger/v1/swagger.json(200), schedule generation (7 of 10 open shifts assigned), the overview (coverage 78.57 %, 11 assigned),requiredStaffvalidation (400) and demo reset all worked.Limitations
xunitstays on v2. Migrating to xunit v3 is a separate, optional step.🤖 Generated with Claude Code