jstedfast/MailKit

Make Mailkit AOT/Net9 compatible

PaulTaro opened this issue · 3 comments

I am using Mailkit in my app for Windows, Android, and iOS. For iOS I must target SDK V17 now. This is supported by Microsoft.iOS only, not more by Xamarin. To produce a release with VS2022, all assemblies should be AOT compatible. Currently I can't release my app for iOS because MailKit is not AOT compatible.

D'oh, I was just hanging out with the Microsoft.iOS and Android team leads for the past 3 days. Wish I had gotten this request a day or two ago.

Oh well. It's probably as simple as adding net-9.0 to the tfm's?

It seems all of the AOT compatibility issues are in MimeKit and not MailKit.

I've fixed the core MimeKit stuff to be AOT compatible (e.g. MimeKitLite should be completely AOT compatible now), but MimeKit still isn't because of all of the reflection needed in the MimeKit.Cryptography namespace - specifically the SqliteCertificateDatabase.

I don't see a path to fixing this, unfortunately.