Avalonia 12 has been released with several breaking changes:
https://docs.avaloniaui.net/docs/avalonia12-breaking-changes
I would like to discuss how R3.Avalonia should support Avalonia 12.
Impact on R3.Avalonia
The most important breaking change for this project seems to be the target framework support.
Avalonia 12 dropped support for .NET Framework and .NET Standard. It only supports .NET 8 and later, with .NET 10 recommended.
Currently, R3.Avalonia targets:
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
and references:
<PackageReference Include="Avalonia" Version="11.0.0" />
I tested replacing the Avalonia package reference with 12.0.3 locally. The net8.0 target builds successfully, but the full multi-target build fails because Avalonia 12 does not provide assets for netstandard2.0, netstandard2.1, or net6.0.
I did not find direct usage of removed Avalonia 12 APIs in the current R3.Avalonia code. Most breaking changes such as binding hierarchy changes, clipboard changes, gesture events, focus event args, window decoration APIs, and platform-specific changes do not appear to affect this project directly.
One behavioral point worth considering is Avalonia 12's multiple dispatcher support. DispatcherTimer now uses Dispatcher.CurrentDispatcher by default, and the migration guide recommends that library/control authors avoid assuming Dispatcher.UIThread where possible. R3.Avalonia currently creates DispatcherTimer instances without explicitly passing a dispatcher, so it may be worth deciding whether to add dispatcher-aware overloads as part of Avalonia 12 support.
Decision needed
What support strategy should R3 use for Avalonia 12?
Possible options I think:
- Update the existing
R3.Avalonia package to Avalonia 12 and drop unsupported target frameworks.
- Keep the existing Avalonia 11 package as-is (
R3.Avalonia) and add a separate Avalonia 12 package/project asR3.Avalonia12.
- Rename the existing Avalonia 11 package as
R3.Avalonia11 and add a separate Avalonia 12 package/project as R3.Avalonia12.
- Rename the existing Avalonia 11 package as
R3.Avalonia11 and add a separate Avalonia 12 package/project as R3.Avalonia.
- Multi-target conditionally, keeping Avalonia 11 support for older TFMs and Avalonia 12 support for
net8.0 or later.
- Another approach preferred by the maintainers.
Once the desired direction is decided, I can send a pull request implementing the change.
Avalonia 12 has been released with several breaking changes:
https://docs.avaloniaui.net/docs/avalonia12-breaking-changes
I would like to discuss how R3.Avalonia should support Avalonia 12.
Impact on R3.Avalonia
The most important breaking change for this project seems to be the target framework support.
Avalonia 12 dropped support for .NET Framework and .NET Standard. It only supports .NET 8 and later, with .NET 10 recommended.
Currently,
R3.Avaloniatargets:and references:
I tested replacing the Avalonia package reference with
12.0.3locally. Thenet8.0target builds successfully, but the full multi-target build fails because Avalonia 12 does not provide assets fornetstandard2.0,netstandard2.1, ornet6.0.I did not find direct usage of removed Avalonia 12 APIs in the current
R3.Avaloniacode. Most breaking changes such as binding hierarchy changes, clipboard changes, gesture events, focus event args, window decoration APIs, and platform-specific changes do not appear to affect this project directly.One behavioral point worth considering is Avalonia 12's multiple dispatcher support.
DispatcherTimernow usesDispatcher.CurrentDispatcherby default, and the migration guide recommends that library/control authors avoid assumingDispatcher.UIThreadwhere possible.R3.Avaloniacurrently createsDispatcherTimerinstances without explicitly passing a dispatcher, so it may be worth deciding whether to add dispatcher-aware overloads as part of Avalonia 12 support.Decision needed
What support strategy should R3 use for Avalonia 12?
Possible options I think:
R3.Avaloniapackage to Avalonia 12 and drop unsupported target frameworks.R3.Avalonia) and add a separate Avalonia 12 package/project asR3.Avalonia12.R3.Avalonia11and add a separate Avalonia 12 package/project asR3.Avalonia12.R3.Avalonia11and add a separate Avalonia 12 package/project asR3.Avalonia.net8.0or later.Once the desired direction is decided, I can send a pull request implementing the change.