From 3ed075a7dab41def579b0afe5e438859460cb0c8 Mon Sep 17 00:00:00 2001 From: Dmitry Afonchenko Date: Wed, 11 Nov 2026 13:42:44 +0400 Subject: [PATCH] chore: move the backend to .NET 11 and refresh NuGet packages All projects target net11.0; the Docker image, the agents image and CI use the .NET 11 SDK and runtime. NuGet packages are raised to their latest stable versions where one exists for .NET 11. Left where they were: - EF Core 8.0.25 and Npgsql.EntityFrameworkCore.PostgreSQL 8.0.11: the Npgsql provider has no stable 11.x yet, and the two move together. - Telegram.Bot 19.0.0: 22.x is an API rewrite, not a version bump. - OpenTelemetry.Exporter.Prometheus.AspNetCore 1.7.0-rc.1: no stable release exists. It caps the other OpenTelemetry packages at 1.17.0, because with 1.18+ /metrics comes back empty. - MediatR stays on 12.x and FluentAssertions on 7.x: later majors need a commercial license. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01TAcLBj2Fn8nAKE4qWyn5es --- .claude/agents/developer.md | 2 +- .github/workflows/start_new_app_version.yml | 2 +- .github/workflows/test.yml | 2 +- CLAUDE.md | 4 +-- Dockerfile | 4 +-- README.md | 2 +- deploy/agents/Dockerfile | 4 +-- src/Application/Application.csproj | 4 +-- src/Domain/Domain.csproj | 2 +- src/Infrastructure/Infrastructure.csproj | 35 ++++++++++--------- src/Persistence/Persistence.csproj | 12 +++---- src/Trale/Trale.csproj | 10 +++--- .../Application.UnitTests.csproj | 12 +++---- .../Domain.UnitTests/Domain.UnitTests.csproj | 10 +++--- .../Infrastructure.UnitTests.csproj | 12 +++---- .../IntegrationTests/IntegrationTests.csproj | 20 +++++------ tests/IntegrationTests/TestDatabase.cs | 3 +- 17 files changed, 70 insertions(+), 70 deletions(-) diff --git a/.claude/agents/developer.md b/.claude/agents/developer.md index c24db873..70d887d6 100644 --- a/.claude/agents/developer.md +++ b/.claude/agents/developer.md @@ -18,7 +18,7 @@ ## Стек -**Backend:** .NET 8, C#, Clean Architecture + CQRS, EF Core, PostgreSQL +**Backend:** .NET 11, C#, Clean Architecture + CQRS, EF Core, PostgreSQL **Frontend:** React 18 + Vite + TypeScript + TailwindCSS, в `src/Trale/miniapp-src/` **Тесты:** xUnit, builder-паттерн для test data (`tests/*/DSL/`) diff --git a/.github/workflows/start_new_app_version.yml b/.github/workflows/start_new_app_version.yml index 1bf0b81d..70cf10ae 100644 --- a/.github/workflows/start_new_app_version.yml +++ b/.github/workflows/start_new_app_version.yml @@ -30,7 +30,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v3 with: - dotnet-version: '7.0.x' + dotnet-version: '11.0.x' - name: Restore Nuget cache uses: actions/cache@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 701bdedd..048cbc55 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '10.0.x' + dotnet-version: '11.0.x' - name: Restore NuGet cache uses: actions/cache@v4 diff --git a/CLAUDE.md b/CLAUDE.md index d53583fa..1709479c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -6,13 +6,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co TraleBot — Telegram mini-app for learning Georgian (ქართული). Прод бот: `@trale_bot`, лендинг: tralebot.com, локальный тест-бот: `@traletest_bot`. -Главный продукт — мини-апп внутри Telegram WebApp. Бэкенд .NET 10 отдаёт REST API + контент уроков, фронт — React-SPA в `src/Trale/wwwroot/`. Что учит пользователя: алфавит, числа, грамматика (падежи, послелоги, спряжение, аорист, имперфект, условия), тематический словарь (кафе, шопинг, такси и т.д.), личный словарь с квизами. +Главный продукт — мини-апп внутри Telegram WebApp. Бэкенд .NET 11 отдаёт REST API + контент уроков, фронт — React-SPA в `src/Trale/wwwroot/`. Что учит пользователя: алфавит, числа, грамматика (падежи, послелоги, спряжение, аорист, имперфект, условия), тематический словарь (кафе, шопинг, такси и т.д.), личный словарь с квизами. Монетизация — Telegram Stars (XTR), pay-once Pro. 6 launch-модулей бесплатны, остальные за Pro. Без hearts/lives и без gating контента (после оплаты — всё доступно). ## Architecture -.NET 10 / C# / Clean Architecture, слои: +.NET 11 / C# / Clean Architecture, слои: - **Domain** (`src/Domain/`) — сущности и доменная логика - **Application** (`src/Application/`) — use cases, команды/запросы (CQRS, миграция от MediatR к services по ARCHITECTURE.md) diff --git a/Dockerfile b/Dockerfile index 96dbd77f..e8edc30b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ COPY src/Trale/Lessons/ /build/src/Trale/Lessons/ RUN npm run build # Stage 2: build the .NET solution, pulling in the freshly built static assets -FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:11.0 AS build WORKDIR /app COPY . ./ COPY /src/Trale/appsettings.json . @@ -33,7 +33,7 @@ COPY src/Trale/audio ./src/Trale/wwwroot/audio RUN dotnet publish src/Trale/Trale.csproj -c Release -o output # Stage 3: runtime — ASP.NET Core serves the API + the SPA bundle from wwwroot -FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:11.0 AS runtime WORKDIR /app COPY --from=build /app/output . EXPOSE 1402 diff --git a/README.md b/README.md index e7651805..c54e8082 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ ## Стек -- **Backend:** .NET 10, C#, Clean Architecture (Domain / Application / Infrastructure / Persistence / Trale Web API), EF Core, PostgreSQL. +- **Backend:** .NET 11, C#, Clean Architecture (Domain / Application / Infrastructure / Persistence / Trale Web API), EF Core, PostgreSQL. - **Mini-app:** React 18 + Vite + TypeScript + Tailwind, в `src/Trale/miniapp-src/`. Сборка статики в `src/Trale/wwwroot/`. - **Тесты:** xUnit (unit + integration с Testcontainers/Postgres), Playwright (E2E мини-аппа), vitest + @testing-library/react (компоненты). - **TTS:** Piper (локальный нейросетевой грузинский голос ka_GE-natia-medium). diff --git a/deploy/agents/Dockerfile b/deploy/agents/Dockerfile index 9eef418a..b81ad26a 100644 --- a/deploy/agents/Dockerfile +++ b/deploy/agents/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y \ ENV TZ=Asia/Tbilisi RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -# --- .NET 10 SDK (official Microsoft packages) --------------------------------- +# --- .NET 11 SDK (official Microsoft packages) --------------------------------- # Needed so: (a) developer/qa agents can actually run `dotnet test` (previously # silently failed — no SDK in image), (b) the dotnet/skills LSP server # (roslyn-language-server) is usable by the developer/tech-lead/qa agents. @@ -25,7 +25,7 @@ RUN curl -fsSL https://packages.microsoft.com/config/debian/12/packages-microsof && dpkg -i /tmp/packages-microsoft-prod.deb \ && rm /tmp/packages-microsoft-prod.deb \ && apt-get update \ - && apt-get install -y dotnet-sdk-10.0 \ + && apt-get install -y dotnet-sdk-11.0 \ && rm -rf /var/lib/apt/lists/* # Install Claude Code CLI diff --git a/src/Application/Application.csproj b/src/Application/Application.csproj index ebe00c04..64dccf77 100644 --- a/src/Application/Application.csproj +++ b/src/Application/Application.csproj @@ -1,14 +1,14 @@ - net10.0 + net11.0 enable enable Application - + diff --git a/src/Domain/Domain.csproj b/src/Domain/Domain.csproj index 94d14d53..1fd7ff60 100644 --- a/src/Domain/Domain.csproj +++ b/src/Domain/Domain.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable Domain diff --git a/src/Infrastructure/Infrastructure.csproj b/src/Infrastructure/Infrastructure.csproj index 57c0ad49..760fb67c 100644 --- a/src/Infrastructure/Infrastructure.csproj +++ b/src/Infrastructure/Infrastructure.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable Infrastructure @@ -12,29 +12,30 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + - - + + + - - - - - - - + + + + + + + - - - + + + diff --git a/src/Persistence/Persistence.csproj b/src/Persistence/Persistence.csproj index 1898a3c0..1d414295 100644 --- a/src/Persistence/Persistence.csproj +++ b/src/Persistence/Persistence.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable Persistence @@ -18,11 +18,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + diff --git a/src/Trale/Trale.csproj b/src/Trale/Trale.csproj index 08be921c..7589fec1 100644 --- a/src/Trale/Trale.csproj +++ b/src/Trale/Trale.csproj @@ -1,22 +1,22 @@ - net10.0 + net11.0 Linux Trale 14 - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + diff --git a/tests/Application.UnitTests/Application.UnitTests.csproj b/tests/Application.UnitTests/Application.UnitTests.csproj index 8ff04d09..836c7427 100644 --- a/tests/Application.UnitTests/Application.UnitTests.csproj +++ b/tests/Application.UnitTests/Application.UnitTests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable @@ -12,11 +12,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Domain.UnitTests/Domain.UnitTests.csproj b/tests/Domain.UnitTests/Domain.UnitTests.csproj index 24892d64..37b361e3 100644 --- a/tests/Domain.UnitTests/Domain.UnitTests.csproj +++ b/tests/Domain.UnitTests/Domain.UnitTests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable @@ -11,10 +11,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj b/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj index 346d49c6..72a2cd59 100644 --- a/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj +++ b/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable @@ -11,11 +11,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/IntegrationTests/IntegrationTests.csproj b/tests/IntegrationTests/IntegrationTests.csproj index 1dad8f39..e9a35d44 100644 --- a/tests/IntegrationTests/IntegrationTests.csproj +++ b/tests/IntegrationTests/IntegrationTests.csproj @@ -1,7 +1,7 @@ - net10.0 + net11.0 enable enable @@ -11,18 +11,18 @@ - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/tests/IntegrationTests/TestDatabase.cs b/tests/IntegrationTests/TestDatabase.cs index bc1872de..f857ced7 100644 --- a/tests/IntegrationTests/TestDatabase.cs +++ b/tests/IntegrationTests/TestDatabase.cs @@ -74,9 +74,8 @@ private static async Task StartContainer() // Fixtures run side by side, each with its own application, connection pool and Hangfire workers, // hence far more connections than the default 100. fsync is off: a test database never has to // survive a crash, and the data lives in memory, so the run touches no disk at all. - var container = new PostgreSqlBuilder() + var container = new PostgreSqlBuilder("postgres:16.1") .WithAutoRemove(true) - .WithImage("postgres:16.1") .WithTmpfsMount("/var/lib/postgresql/data") .WithCommand("-c", "max_connections=1000", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off") .Build();