Skip to content

chore: exploratory migration to .NET 10 #21

@shukebeta

Description

@shukebeta

Goal

Explore upgrading the solution from net8.0 to net10.0. This is not a sprint item — the branch should be kept in sync with master and merged only when all blockers are resolved and CI is fully green.

Branch strategy

Work on a dedicated branch (e.g. chore/net10-migration). Rebase or merge from master regularly. Do not open a PR to master until every item in the checklist below is resolved.

Known blockers

1. Shukebeta.Api.Framework — highest priority

  • The private NuGet package currently targets net8.0 only.
  • Must be updated to target net10.0 (or netstandard2.1 / multi-target) before anything else compiles.
  • WeihanLi.Common 1.0.64 is a transitive dependency of this package — verify it supports net10 as well.

2. Telegram.Bot 18.0.0

  • Only declares targets up to .NETCoreApp3.1.
  • Upgrade to v19+ which has explicit net8/net9 support. Review breaking-change log between v18 and v19 before upgrading.

3. SqlSugarCore 5.1.4.189

  • Targets netstandard2.1 only; no explicit net10 target.
  • Likely works via compatibility shim but ORM runtime reflection behaviour may differ. Run the full integration test suite after the upgrade and watch for subtle query/mapping regressions.

Items to verify (probably fine, but confirm)

Package Current version Concern
Mastonet 3.1.2 Declared support stops at net8; run Mastodon integration tests
CoreHtmlToImage 1.0.6 netstandard2.0 — net10 stricter runtime validation may surface issues
AutoMapper 13.0.1 Known high-severity vulnerability (GHSA-rvv3-g6hj-g44x); consider upgrading alongside the migration

Migration steps (suggested order)

  • Update Shukebeta.Api.Framework to support net10; publish new version
  • Change global.json SDK version to 10.0.x
  • Change all <TargetFramework>net8.0</TargetFramework>net10.0 in every .csproj
  • Resolve compilation errors
  • Upgrade Telegram.Bot to v19+ and adapt call sites to breaking changes
  • Run dotnet test (unit + integration) and fix failures
  • Deploy to a staging environment; smoke-test Telegram and Mastodon sync paths
  • Remove dotnet-sdk-8.0 from dev machines and CI once green
  • Open PR to master

Runtime note

The production server needs dotnet-runtime-10.0 installed before the first net10 deployment. Install it in parallel with dev work so it is ready when the branch lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions