Skip to content

Commit 905ee22

Browse files
authored
Merge pull request #371 from nanotaboada/feat/dotnet-10-lts
feat: upgrade to .NET 10 LTS (#368)
2 parents 0617290 + 9661cd6 commit 905ee22

File tree

13 files changed

+546
-818
lines changed

13 files changed

+546
-818
lines changed

.github/copilot-instructions.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
77
## Quick Context
88

9-
ASP.NET Core 8 REST API with layered architecture
10-
**Stack**: .NET 8 LTS, EF Core 9, SQLite, Docker, xUnit
9+
ASP.NET Core 10 REST API with layered architecture
10+
**Stack**: .NET 10 LTS, EF Core 10, SQLite, Docker, xUnit
1111
**Pattern**: Repository + Service + AutoMapper + FluentValidation
1212
**Focus**: Learning PoC emphasizing clarity and best practices
1313

@@ -19,7 +19,11 @@ ASP.NET Core 8 REST API with layered architecture
1919
- **Logging**: Serilog with structured logging
2020
- **Testing**: xUnit + Moq + FluentAssertions
2121
- **Formatting**: CSharpier
22-
- **Commits**: Subject ≤80 chars, include issue number (#123), body lines ≤80 chars, conventional commits
22+
- **Commits**: Conventional Commits with issue number suffix
23+
- Format: `type(scope): description (#issue)` (max 80 chars)
24+
- Types: feat, fix, chore, docs, test, refactor
25+
- Example: `feat(api): add player search endpoint (#123)`
26+
- Body lines ≤80 chars
2327

2428
## Architecture
2529

.github/workflows/dotnet-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- 'v*.*.*-*'
1010

1111
env:
12-
DOTNET_VERSION: 8.0.x
12+
DOTNET_VERSION: 10.0.x
1313
PACKAGE_NAME: nanotaboada/dotnet-samples-aspnetcore-webapi
1414

1515
jobs:

.github/workflows/dotnet-ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
branches: [ "master" ]
1111

1212
env:
13-
DOTNET_VERSION: 8.0.x
13+
DOTNET_VERSION: 10.0.x
1414

1515
jobs:
1616
build:
@@ -49,6 +49,15 @@ jobs:
4949
- name: Checkout repository
5050
uses: actions/checkout@v6.0.2
5151

52+
- name: Set up .NET ${{ env.DOTNET_VERSION }}
53+
uses: actions/setup-dotnet@v5.1.0
54+
with:
55+
dotnet-version: ${{ env.DOTNET_VERSION }}
56+
cache: true
57+
cache-dependency-path: |
58+
src/Dotnet.Samples.AspNetCore.WebApi/packages.lock.json
59+
test/Dotnet.Samples.AspNetCore.WebApi.Tests/packages.lock.json
60+
5261
- name: Lint commit messages
5362
uses: wagoid/commitlint-github-action@v6.2.1
5463

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ curl https://localhost:9000/health
2929

3030
## .NET Version
3131

32-
This project targets **.NET 8 (LTS)**.
32+
This project targets **.NET 10 (LTS)**.
3333

3434
## Development Workflow
3535

CHANGELOG.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,8 @@ This project uses famous football stadiums (A-Z) that hosted FIFA World Cup matc
4444

4545
### Added
4646

47-
- Token efficiency strategy for Copilot/AI agents with optimized instruction loading and improved token counting script (#364)
48-
4947
### Changed
5048

51-
- Bump Swashbuckle.AspNetCore from 10.1.0 to 10.1.2
52-
- Bump docker/login-action from 3.6.0 to 3.7.0
53-
- Bump softprops/action-gh-release from 2.2.0 to 2.5.0
54-
- Bump actions/checkout from 6.0.1 to 6.0.2
55-
5649
### Deprecated
5750

5851
### Removed
@@ -63,6 +56,26 @@ This project uses famous football stadiums (A-Z) that hosted FIFA World Cup matc
6356

6457
---
6558

59+
## [1.1.0 - bernabeu] - 2026-02-09
60+
61+
### Changed
62+
63+
- Upgrade to .NET 10 LTS from .NET 8 (#368)
64+
- Update Microsoft.AspNetCore.OpenApi to 10.0.0
65+
- Update Microsoft.EntityFrameworkCore.Sqlite to 10.0.0
66+
- Update Microsoft.EntityFrameworkCore.Design to 10.0.0
67+
- Update Microsoft.VisualStudio.Web.CodeGeneration.Design to 10.0.0
68+
- Update Docker images to .NET 10 SDK and runtime (now based on Ubuntu 24.04 LTS instead of Debian 12)
69+
- Update Dockerfile user creation commands for Ubuntu compatibility (`groupadd`/`useradd` instead of `adduser`)
70+
- Update CI/CD pipelines to use .NET 10 SDK
71+
- Token efficiency strategy for Copilot/AI agents with optimized instruction loading and improved token counting script (#364)
72+
- Bump Swashbuckle.AspNetCore from 10.1.0 to 10.1.2
73+
- Bump docker/login-action from 3.6.0 to 3.7.0
74+
- Bump softprops/action-gh-release from 2.2.0 to 2.5.0
75+
- Bump actions/checkout from 6.0.1 to 6.0.2
76+
77+
---
78+
6679
## [1.0.0 - azteca] - 2026-01-22
6780

6881
Initial release. See [README.md](README.md) for complete feature list and documentation.
@@ -154,5 +167,6 @@ The CD workflow automatically:
154167

155168
---
156169

157-
[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.0.0-azteca...HEAD
170+
[unreleased]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.1.0-bernabeu...HEAD
171+
[1.1.0 - bernabeu]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/compare/v1.0.0-azteca...v1.1.0-bernabeu
158172
[1.0.0 - azteca]: https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/releases/tag/v1.0.0-azteca

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Stage 1: Builder
33
# This stage builds the application and its dependencies.
44
# ------------------------------------------------------------------------------
5-
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
5+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS builder
66

77
WORKDIR /src
88

@@ -22,7 +22,7 @@ RUN dotnet publish -c Release -o /app/publish
2222
# Stage 2: Runtime
2323
# This stage creates the final, minimal image to run the application.
2424
# ------------------------------------------------------------------------------
25-
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
25+
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
2626

2727
WORKDIR /app
2828

@@ -31,8 +31,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl && \
3131
rm -rf /var/lib/apt/lists/*
3232

3333
# Metadata labels for the image. These are useful for registries and inspection.
34-
LABEL org.opencontainers.image.title="🧪 Web API made with .NET 8 (LTS) and ASP.NET Core"
35-
LABEL org.opencontainers.image.description="Proof of Concept for a Web API made with .NET 8 (LTS) and ASP.NET Core"
34+
LABEL org.opencontainers.image.title="🧪 Web API made with .NET 10 (LTS) and ASP.NET Core"
35+
LABEL org.opencontainers.image.description="Proof of Concept for a Web API made with .NET 10 (LTS) and ASP.NET Core"
3636
LABEL org.opencontainers.image.licenses="MIT"
3737
LABEL org.opencontainers.image.source="https://github.com/nanotaboada/Dotnet.Samples.AspNetCore.WebApi"
3838

@@ -57,7 +57,7 @@ COPY --chmod=555 scripts/healthcheck.sh ./healthcheck.sh
5757
COPY --from=builder /src/Dotnet.Samples.AspNetCore.WebApi/storage/players-sqlite3.db ./hold/players-sqlite3.db
5858

5959
# Add non-root user and make volume mount point writable
60-
RUN adduser --system --disabled-password --group aspnetcore && \
60+
RUN groupadd -r aspnetcore && useradd -r -g aspnetcore aspnetcore && \
6161
mkdir -p /storage && \
6262
chown aspnetcore:aspnetcore /storage
6363

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![CodeFactor](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi/badge)](https://www.codefactor.io/repository/github/nanotaboada/Dotnet.Samples.AspNetCore.WebApi)
1010
[![License: MIT](https://img.shields.io/badge/License-MIT-white.svg)](https://opensource.org/licenses/MIT)
1111

12-
Proof of Concept for a RESTful API built with .NET 8 (LTS) and ASP.NET Core. Manage football player data with SQLite, Entity Framework Core, Swagger documentation, and in-memory caching.
12+
Proof of Concept for a RESTful API built with .NET 10 (LTS) and ASP.NET Core. Manage football player data with SQLite, Entity Framework Core, Swagger documentation, and in-memory caching.
1313

1414
## Table of Contents
1515

@@ -43,13 +43,13 @@ Proof of Concept for a RESTful API built with .NET 8 (LTS) and ASP.NET Core. Man
4343

4444
| Category | Technology |
4545
|----------|------------|
46-
| **Framework** | [.NET 8](https://github.com/dotnet/core) (LTS) |
47-
| **Web Framework** | [ASP.NET Core 8.0](https://github.com/dotnet/aspnetcore) |
46+
| **Framework** | [.NET 10](https://github.com/dotnet/core) (LTS) |
47+
| **Web Framework** | [ASP.NET Core 10.0](https://github.com/dotnet/aspnetcore) |
4848
| **API Documentation** | [Swashbuckle](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) (OpenAPI 3.0) |
4949
| **Validation** | [FluentValidation 12](https://github.com/FluentValidation/FluentValidation) |
5050
| **Mapping** | [AutoMapper 14](https://github.com/AutoMapper/AutoMapper) |
5151
| **Database** | [SQLite 3](https://github.com/sqlite/sqlite) |
52-
| **ORM** | [Entity Framework Core 9.0](https://github.com/dotnet/efcore) |
52+
| **ORM** | [Entity Framework Core 10.0](https://github.com/dotnet/efcore) |
5353
| **Logging** | [Serilog 9](https://github.com/serilog/serilog) |
5454
| **Testing** | [xUnit](https://github.com/xunit/xunit), [Moq](https://github.com/devlooped/moq), [FluentAssertions](https://github.com/fluentassertions/fluentassertions) |
5555
| **Containerization** | [Docker](https://github.com/docker) & [Docker Compose](https://github.com/docker/compose) |
@@ -204,7 +204,7 @@ For complete endpoint documentation with request/response schemas, explore the [
204204

205205
Before you begin, ensure you have the following installed:
206206

207-
- .NET 8 SDK (LTS) or higher
207+
- .NET 10 SDK (LTS) or higher
208208
- Docker Desktop (optional, for containerized deployment)
209209
- dotnet-ef CLI tool (for database migrations)
210210

azure-pipelines.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# ASP.NET Core 8.0
2-
# Build and test ASP.NET Core projects targeting .NET 8 on Linux.
1+
# ASP.NET Core 10.0
2+
# Build and test ASP.NET Core projects targeting .NET 10 on Linux.
33
# https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/dotnet-core
44

55
# Pipeline triggers:
@@ -26,7 +26,7 @@ variables:
2626

2727
# Pipeline steps (equivalent to GitHub Actions 'steps:')
2828
steps:
29-
# Checkout repository (equivalent to actions/checkout@v6)
29+
# Checkout repository (equivalent to actions/checkout)
3030
# Azure Pipelines does this implicitly, but making it explicit for clarity
3131
- checkout: self
3232
displayName: "Checkout repository"
@@ -41,12 +41,12 @@ steps:
4141
nuget | "$(Agent.OS)"
4242
path: $(NUGET_PACKAGES)
4343

44-
# Install .NET 8 SDK (equivalent to actions/setup-dotnet@v5)
44+
# Install .NET 10 SDK (equivalent to actions/setup-dotnet)
4545
# performMultiLevelLookup: allows finding other SDK versions if needed
4646
- task: UseDotNet@2
47-
displayName: "Set up .NET 8"
47+
displayName: "Set up .NET 10"
4848
inputs:
49-
version: "8.x"
49+
version: "10.x"
5050
performMultiLevelLookup: true
5151

5252
# Restore NuGet packages (equivalent to 'dotnet restore')

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.100",
4+
"rollForward": "latestFeature"
5+
}
6+
}

src/Dotnet.Samples.AspNetCore.WebApi/Dotnet.Samples.AspNetCore.WebApi.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
88
</PropertyGroup>
99

1010
<ItemGroup Label="Development dependencies">
11-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" PrivateAssets="all" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.12" PrivateAssets="all" />
11+
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.0" PrivateAssets="all" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0" PrivateAssets="all" />
1313
</ItemGroup>
1414

1515
<ItemGroup Label="Runtime dependencies">
16-
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.23" />
17-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.12" />
18-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.2" />
16+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
17+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0" />
1918
<PackageReference Include="AutoMapper" Version="[14.0.0,15.0.0)" />
2019
<PackageReference Include="FluentValidation" Version="12.1.1" />
2120
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="12.1.1" />

0 commit comments

Comments
 (0)