I have a MAUI application (.NET 7) referencing a custom class library (.dll) with an EF Core infrastructure (.NET 6) which nicely compiles and deploys in Debug mode on all platforms. Unfortunately, when I try to compile and pack it I get the following error:
/usr/local/share/dotnet/packs/Microsoft.MacCatalyst.Sdk/16.2.1040/targets/Xamarin.Shared.Sdk.targets(1011,3): error : Failed to AOT compile MyLibrary.dll, the AOT compiler exited with code 1 1 Error(s)
or a similar one on Android or MacCatalyst.
Is there any option I am missing to deactivate AOT Compilation? Can I deactivate it since I also have to pack it for iOS devices? Or should I change something on the library project itself to make it fitting to be AOT compiled?