Mail.dll – Add MandroidI18n in Xamarin release mode

Mail.dll requires multiple encodings to work.

By default in the Release mode, Xamarin applications link only most common encodings. Of course this is not enough to handle multi-national email messages.

If on startup your application receives MissingEncodingException error, you need to add MandroidI18n into your .csproj (e.g. App1.Android.csproj):

<MandroidI18n>All</MandroidI18n>

You might need to unload the project first to be able to edit it:

Alternatively you can go to:

Android project -> Properties -> Android Options

and select all possible encodings in:

Linker properties -> Additional supported encodings

Tags:

Questions?

Consider using our Q&A forum for asking questions.