Avalonia: update to .NET 10 and Avalonia 12
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.0everywhere, set throughDirectory.Build.propsand the Avalonia csproj.global.jsonnow pins SDK10.0.*.- CI workflows install
10.0.x. - The nuspec
lib\net10.0paths are updated. - The publish profile is renamed to
Net10.0-SelfContained.pubxml, andpost_build.ps1points at the new name. - README now asks for the .NET 10 SDK and Visual Studio 2026.
- Packages
Microsoft.Extensions.*andSystem.Data.OleDbare updated to 10.0.12.System.Linq.Asyncis removed.System.Linq.AsyncEnumerableis 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
FAprefix (FASettingsExpander,FAContentDialog,FANavigationView, …), and XAML and C# are renamed to match. - AvaloniaUI.DiagnosticsSupport is updated to 2.2.3.
Avalonia.Diagnosticsis removed because it has no v12 release; DevTools are still available throughAttachDeveloperTools. - API updates:
SystemDecorationsbecomesWindowDecorations, andExtendClientAreaChromeHintsis removed.WatermarkbecomesPlaceholderText.- Clipboard text now goes through
ClipboardExtensions.
- 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
- 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=trueon 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.0tonet10.0-windows10.0.19041.0; SDK pinning, CI workflows, nuspec paths, README, and the publish profile (renamedNet10.0-SelfContained.pubxml) follow. Microsoft.Extensions.*andSystem.Data.OleDbupdate 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
SystemDecorationstoWindowDecorationsandWatermarktoPlaceholderText; clipboard text now goes throughClipboardExtensions, andExtendClientAreaChromeHintsis 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
ObservableCollectioninstead of DynamicData'sSourceList. - 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.targetstarget strips native.pdbfiles (from SkiaSharp/HarfBuzzSharp and similar packages, ~100 MB per architecture) from build and publish output; non-Windows native assets, unused Linux RID libraries, the flattenedruntimes\folder, andcreatedump.exeare also trimmed from the Windows-only app.
What existing logic or behaviour code is removed:
System.Linq.Asyncis dropped (now in the base library; having both caused ambiguous calls), DynamicData is no longer referenced, andAvalonia.Diagnosticsis removed (no v12 release; DevTools remain viaAttachDeveloperTools).- 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.