Bug 12466 - MailSettingsSectionGroup generates error
Summary: MailSettingsSectionGroup generates error
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: mmp ()
Version: 1.4.x
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: Timothy Risi
URL:
Depends on:
Blocks:
 
Reported: 2013-05-30 02:10 UTC by Tony
Modified: 2016-07-20 19:01 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED NOT_ON_ROADMAP

Description Tony 2013-05-30 02:10:40 UTC
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."
Comment 1 Aaron Bockover [MSFT] 2013-06-03 10:15:09 UTC
Also sounds like a linker issue. Likely a duplicate of #12465.
Comment 2 Sebastien Pouliot 2013-06-03 11:09:05 UTC
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)
Comment 3 Aaron Bockover [MSFT] 2013-09-26 13:12:22 UTC
*** Bug 12565 has been marked as a duplicate of this bug. ***
Comment 4 Chris Hamons 2016-07-20 19:01:26 UTC
Modern Xamarin.Mac application support two different target frameworks:

https://developer.xamarin.com/guides/mac/advanced_topics/target-framework/

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.