Avalonia: update to .NET 10 and Avalonia 12

Draft
TA
19h ago
+1290-2932

Summary

Moves the Avalonia migration branch to .NET 10 and Avalonia 12. Targets avalonia-migration-minimal. #4705 (macOS support) is stacked on top of this PR.

Changes

  • .NET 10
    • net10.0-windows10.0.19041.0 everywhere, set through Directory.Build.props and the Avalonia csproj.
    • global.json now pins SDK 10.0.*.
    • CI workflows install 10.0.x.
    • The nuspec lib\net10.0 paths are updated.
    • The publish profile is renamed to Net10.0-SelfContained.pubxml, and post_build.ps1 points at the new name.
    • README now asks for the .NET 10 SDK and Visual Studio 2026.
  • Packages
    • Microsoft.Extensions.* and System.Data.OleDb are updated to 10.0.12.
    • System.Linq.Async is removed. System.Linq.AsyncEnumerable is now part of the base library, and having both made the calls ambiguous.
  • Avalonia 12.1.4
    • FluentAvaloniaUI is updated to 3.1.0. It is net10.0-only, which is why this needs .NET 10. Its control types now carry an FA prefix (FASettingsExpander, FAContentDialog, FANavigationView, …), and XAML and C# are renamed to match.
    • AvaloniaUI.DiagnosticsSupport is updated to 2.2.3. Avalonia.Diagnostics is removed because it has no v12 release; DevTools are still available through AttachDeveloperTools.
    • API updates:
      • SystemDecorations becomes WindowDecorations, and ExtendClientAreaChromeHints is removed.
      • Watermark becomes PlaceholderText.
      • Clipboard text now goes through ClipboardExtensions.
  • WPF XAML: two empty <Grid.ColumnDefinitions /> elements are removed, because the .NET 10 XAML compiler rejects them (MC3026).

Verification

  • Build: dotnet build Flow.Launcher.sln --no-incremental -p:EnableWindowsTargeting=true on macOS gives 0 errors.
  • macOS: the Avalonia 12 / .NET 10 runtime was checked on macOS through #4705:
    • The main window renders unchanged.
    • The Settings window renders with the FA3 controls.
    • The hotkey and all plugins load.
  • Not run: anything on Windows, and the unit tests.

Known issue (not caused by this PR)

Some settings icon names (Power, Hide, MoveUp, Info, Down, FolderOpen, DeveloperTools, OpenFolderHorizontal) aren't FluentAvalonia symbols in either FA 2.x or 3.x, so the icon slot shows the name as text.


Summary by cubic

Summary of changes

Moves the Avalonia migration branch to .NET 10 and Avalonia 12, updating target frameworks, packages, UI API usage, the publish pipeline, and the results list rendering path.

What existing logic or behaviour code is changed:

  • Target framework moves from net9.0-windows10.0.19041.0 to net10.0-windows10.0.19041.0; SDK pinning, CI workflows, nuspec paths, README, and the publish profile (renamed Net10.0-SelfContained.pubxml) follow.
  • Microsoft.Extensions.* and System.Data.OleDb update to 10.0.12; FluentAvaloniaUI 3.1.0 renames controls to FA-prefixed types (FASettingsExpander, FAContentDialog, FANavigationView, FASymbolIcon, FAFontIcon) across XAML and C#.
  • Avalonia 12.1.4 renamed SystemDecorations to WindowDecorations and Watermark to PlaceholderText; clipboard text now goes through ClipboardExtensions, and ExtendClientAreaChromeHints is dropped.
  • The result list no longer flickers or resets selection while typing; an unchanged top result keeps its instance and index, images only reload when the icon or badge actually changes, and the results list now uses an ObservableCollection instead of DynamicData's SourceList.
  • The selection bullet template element is removed from the result list and selection indicator transitions are disabled.

What new logic or behaviour code is added:

  • The Avalonia package is now published self-contained for win-x64, matching the WPF build; it previously required the .NET 10 Desktop Runtime on the user's machine.
  • A shared Directory.Build.targets target strips native .pdb files (from SkiaSharp/HarfBuzzSharp and similar packages, ~100 MB per architecture) from build and publish output; non-Windows native assets, unused Linux RID libraries, the flattened runtimes\ folder, and createdump.exe are also trimmed from the Windows-only app.

What existing logic or behaviour code is removed:

  • System.Linq.Async is dropped (now in the base library; having both caused ambiguous calls), DynamicData is no longer referenced, and Avalonia.Diagnostics is removed (no v12 release; DevTools remain via AttachDeveloperTools).
  • Two empty <Grid.ColumnDefinitions /> elements are removed because the .NET 10 XAML compiler rejects them.

Memory usage impacts: none expected at runtime; the PDB trim shrinks build output size and the dropped packages slightly reduce the dependency footprint.

Security risks: none introduced; all package updates are minor version bumps within the same major versions.

Unit tests: added tests covering selection preservation when the top result is unchanged across queries; verification covered a successful macOS build and a manual runtime check of the main window, settings window, hotkey, and plugins. Windows runtime and the full test suite were not run.

Release Note

Flow Launcher has been updated to run on .NET 10 with refreshed settings screens and controls, and now ships with everything needed to run out of the box.