Skip to content

AOT compilation support #1278

@umlx5h

Description

@umlx5h

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I'm trying to build an Avalonia desktop application using Lucene.NET. but I want to publish as an AOT executable.
However, when I perform an AOT build on an app using Lucene, the following runtime error occurs.

I used the sample code below.
https://lucenenet.apache.org/

Application: AvaloniaAOTTest.exe
CoreCLR Version: 10.0.6
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
   at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) + 0x133
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0xbf
   at System.Delegate.DynamicInvokeImpl(Object[]) + 0x50
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs) + 0x14b
   at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive, RoutedEventArgs) + 0xfd
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs) + 0x3c
   at Avalonia.Controls.Control.<>c.<.cctor>b__66_0() + 0xdf
   at Avalonia.Threading.DispatcherOperation.InvokeCore() + 0x192
   at Avalonia.Threading.DispatcherOperation.Execute() + 0x5f
   at Avalonia.Threading.Dispatcher.ExecuteJob(DispatcherOperation) + 0x78
   at Avalonia.Threading.Dispatcher.ExecuteJobsCore(Boolean) + 0xf0
   at Avalonia.Win32.Win32Platform.WndProc(IntPtr, UInt32, IntPtr, IntPtr) + 0x58
   at AvaloniaAOTTest!<BaseAddress>+0x82c99a

I can run the program by commenting out the sections that use Lucene.
Does this project support AOT? If not, are there any plans to add support?

Thanks.

Describe the solution you'd like

AOT available

Additional context

    <PackageReference Include="Lucene.Net" Version="4.8.0-beta00017" />
    <PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00017" />

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions