FluentAvalonia icon indicating copy to clipboard operation
FluentAvalonia copied to clipboard

.NET 8 support, AOT and json source generator fixes

Open hez2010 opened this issue 1 year ago • 3 comments

  • Use json source generator to avoid trimming/AOT issue as well as the incompatibility on .NET 8
  • Bump AvaloniaEdit to 11.0.5 to fix AOT issue

Fixes #481 Fixes #492

hez2010 avatar Nov 07 '23 08:11 hez2010

@amwx Could you please take a look at this change? I know you have been busy with your job, but this is a trivial fix to resolve the issue with .NET 8. .NET 8 GA is coming today, and major people will start to encounter this issue immediately.

hez2010 avatar Nov 14 '23 11:11 hez2010

This would be very useful to have in case it solves issues in .NET 8 and NativeAOT within the NavigationView that I encountered.

Unfortunately, the workaround <JsonSerializerIsReflectionEnabledByDefault>true</JsonSerializerIsReflectionEnabledByDefault> in the project file only let it run without an Exception, but now the NavigationView pages don't get their content instead, I think in my case due to the unresolved issue with the FluentAvalonia.UI.FALocalizationHelper.FALocalizationHelper constructor as this is what is thrown at startup without the workaround.

If I run my project without AOT, everything works like normal. So this is what I'm doing for now. :)

jonasnordlund avatar Jan 23 '24 12:01 jonasnordlund

Done.

hez2010 avatar Feb 18 '24 08:02 hez2010