Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
In a Release build for Mac I'm trying to send email with an SmtpClient.
It works perfectly when debugging, but in the release it generates an error:
"Default constructor not found for type System.Net.Configuration.MailSettingsSectionGroup."
Also sounds like a linker issue. Likely a duplicate of #12465.
It's mostly the same reason (reflection) as #12465 but not the same issue.
System.Configuration is not linker friendly since it depends on both reflection and custom/external configuration files.
This will be properly fixed once we ship a MOBILE-based profile (a BCL without System.Configuration) with Xamarin.Mac. In the mean time the workaround is to:
a) disable the linker
b) provide an xml file to the linker that provides the types to preserve. That's a quite long list that depends on your code and your .config files (and a lot of trial and errors)
*** Bug 12565 has been marked as a duplicate of this bug. ***
Modern Xamarin.Mac application support two different target frameworks:
only one of which supports Linking, mobile. Mobile does not support System.Configuration, so this bug really only affects:
- Classic Applications
- Who have the linker enabled
which is not the most supported configuration.
Patching up this use case in Classic is not on our roadmap.
Please consider migrating to Xamarin.Mac Unified Mobile.