NativeAOT Serialization Troubles
I'm trying to serialize the following (in an ideally fast manner and binary format, but I am willing to compromise) using NativeAOT (this is a requirement!):
A class containing a custom SparseSet (2 arrays internally) implementation containing a set of classes deriving from a shared interface.
I'm currently using MemoryPack for this, however it is not working whatsoever, and the following error occurs:
I've attached a sample of this scenario reproducing the above error. It works fine when not using NativeAOT, but as I mentioned NAOT is a requirement for me.
If anyone has any ideas on how to get this to serialize at all - no matter using what library or whatever - please inform me!
A class containing a custom SparseSet (2 arrays internally) implementation containing a set of classes deriving from a shared interface.
I'm currently using MemoryPack for this, however it is not working whatsoever, and the following error occurs:
I've attached a sample of this scenario reproducing the above error. It works fine when not using NativeAOT, but as I mentioned NAOT is a requirement for me.
If anyone has any ideas on how to get this to serialize at all - no matter using what library or whatever - please inform me!
Program.cs1.62KB