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.
I'm running the latest alpha:
Xamarin.Android 4.12.00012 (56127394)
Visual Studio plugin to enable development for Xamarin.Android.
Xamarin.iOS 1.10.39 (e0334707)
Visual Studio extension to enable development for Xamarin.iOS
And the following code sample works on in debug mode, but doesn't work in release.
[Activity(Label = "ConnectionTest", MainLauncher = true, Icon = "@drawable/icon")]
public class Activity1 : Activity
int count = 1;
protected override void OnCreate(Bundle bundle)
// Set our view from the "main" layout resource
// Get our button from the layout resource,
// and attach an event to it
Button button = FindViewById<Button>(Resource.Id.MyButton);
button.Click += async (sender, args) =>
if (await DownloadFromHttps())
button.Text = "OK!";
button.Text = "Broken";
public async Task<bool> DownloadFromHttps()
HttpClient client = new HttpClient();
string result = await client.GetStringAsync(url);
catch (Exception err)
Comment 1 is from the case file. The code in comment 1 is in the attached sample project.
After some investigation, I found that either setting the Linker to "Don't link" and/or checking "Use shared runtime" in the Release configuration makes the exception go away.
More from the case:
I'm using vs2013 with update 1 applied, and the code will work if its pasted into the default android app, and at the http package via nuget.
Remember that it only breaks in release mode, and works fine in debug strangely.
I think the issue is something to do with DNS lookup, but the error doesn't really give me much more.
Running the same code in stable works fine in both release and debug mode.
Let me know if you need anything more.
This is probably a dupe of #17397: SSL is busted when the linker is enabled.
*** This bug has been marked as a duplicate of bug 17397 ***