[feature] Infrastructure migration to SDK v10.0
[feature] Migrate to .NET SDK 10
Context
ByteSync currently runs on a single runtime version, ensuring consistency and allowing the use of modern language and runtime features uniformly:
| Project | Current TFM | LangVersion |
|---|---|---|
ByteSync.Client |
net8.0 |
default |
ByteSync.Common |
net8.0 |
default |
ByteSync.ServerCommon |
net8.0 |
default |
ByteSync.Functions |
net8.0 |
default |
| All 7 test projects | net8.0 |
default |
[!IMPORTANT] The build error
CS8652inInventoryPart.cs(use of thefieldkeyword) is a direct symptom of this inconsistency:ByteSync.Clienttargets net9 but usesLangVersion=default, which maps to C# 13 on net9 — but thefieldkeyword only became stable in C# 14 (net10). Migrating to net10 + C# 14 is the clean fix; alternatively, settingLangVersion=previewis a short-term workaround.
Goal
Migrate the entire solution to .NET 10 and align all projects on C# 14 (LangVersion=default on net10), ensuring:
- A uniform SDK across all projects (source + tests)
- Compatibility with Azure Functions v4 on .NET 10 (isolated worker)
- All NuGet dependencies updated to versions supporting
net10.0
Scope of changes
Source projects (4)
[MODIFY] ByteSync.Client.csproj
<TargetFramework>net9.0</TargetFramework>→net10.0<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>— verify net10 RIDs still valid- Review all NuGet packages for net10 compatible versions (Avalonia, SignalR, Azure SDK, etc.)
[MODIFY] ByteSync.Common.csproj
<TargetFramework>net8.0</TargetFramework>→net10.0- Update
Microsoft.Extensions.Logging.Abstractions,Serilog,System.IO.Abstractions
[MODIFY] ByteSync.ServerCommon.csproj
<TargetFramework>net8.0</TargetFramework>→net10.0- Update
Microsoft.AspNetCore.Authentication.JwtBearer(8.x → 10.x) - Update
Microsoft.Extensions.*packages (8.x → 10.x) - Verify
Azure.Identity,Azure.Storage.Blobs,AWSSDK.S3,StackExchange.Redis,RedLock.netcompatibility
[MODIFY] ByteSync.Functions.csproj
<TargetFramework>net8.0</TargetFramework>→net10.0<AzureFunctionsVersion>v4</AzureFunctionsVersion>— Azure Functions v4 supports .NET 10 isolated worker ✓- Update
Microsoft.Azure.Functions.Worker*packages (1.x → latest net10-compatible) - Update
Microsoft.AspNetCore.Authentication.JwtBearer(8.0.23 → 10.x) - Update
Microsoft.Azure.AppConfiguration.AspNetCore,Microsoft.Azure.SignalR - Verify
MediatR,RedLock.net,StackExchange.Redis
Test projects (7)
ByteSync.Client.UnitTests— net8.0 → net10.0ByteSync.Client.IntegrationTests— net8.0 → net10.0ByteSync.Common.Tests— net8.0 → net10.0ByteSync.Functions.UnitTests— net8.0 → net10.0ByteSync.Functions.IntegrationTests— net8.0 → net10.0ByteSync.ServerCommon.Tests— net8.0 → net10.0ByteSync.TestsCommon— net8.0 → net10.0
For each: update NuGet test packages (NUnit, FluentAssertions, NSubstitute, etc.) to net10-compatible versions.
Key risks & things to investigate
[!WARNING] Azure Functions .NET 10 support — As of early 2026, the isolated worker model supports .NET 10 preview. Confirm GA availability and that
Microsoft.Azure.Functions.Worker≥ 2.x supports net10.
[!WARNING] Avalonia net10 support — Avalonia 11.x targets
net8.0libs. Verify that referencing net8 Avalonia assemblies from a net10 consumer is supported (it generally is via compatibility shim), or wait for an Avalonia release withnet10.0TFMs.
[!CAUTION]
Microsoft.AspNetCore.SignalR.Client(currently 8.0.23) — Must be bumped to 10.x. Possible breaking changes in SignalR connection API and hub protocols.
[!NOTE]
fieldkeyword (CS8652) — Once on net10 withLangVersion=default(C# 14), this error disappears naturally. No code change needed inInventoryPart.cs.
[!NOTE]
global.json— There is currently noglobal.jsonat the repository root. Adding one that pins the .NET 10 SDK version is recommended for reproducible builds.
Suggested implementation order
- Add a
global.jsonat the repo root to pin the .NET 10 SDK - Migrate
ByteSync.Commonfirst (least dependencies) - Migrate
ByteSync.ServerCommon(depends on Common) - Migrate
ByteSync.Functions(depends on ServerCommon) - Migrate
ByteSync.Client(independent from server projects) - Migrate all test projects
- Run full build + all tests
- Validate the Azure Functions host starts locally with net10
Verification plan
dotnet buildon the full solution with zero errorsdotnet test— all test suites green- Manual smoke test: launch
ByteSync.Clientlocally - Manual smoke test: launch
ByteSync.Functionslocally viafunc start - CI pipeline passes (if applicable)