System.Net.Dns.GetHostAddresses hangs after update to 5.0.0.2083 (works on 1931)

Tomer.Z 96 Reputation points
2021-08-09T14:53:56.117+00:00

The following code worked for me for 2 years:
var addr = System.Net.Dns.GetHostAddresses(url);

After updating Xamarin (and Essentials) to 5.0.0.2083 it's just hanging there until app crashes.

Any ideas/workaround?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,299 questions
{count} votes

Accepted answer
  1. Tomer.Z 96 Reputation points
    2021-08-15T16:05:13.717+00:00

    Hi @JarvanZhang , thank you for your attention.
    I forgot to mention that i also updated VS (pro) to 16.10.4

    The issue was the emulator had no internet access, this is weird because as i said - before those upgrades everything worked fine.
    It looks like that one of the updates messed the emulators configuration.

    After creating a new emulator everything went back to track.
    So i updated Xamarin back to latest and still worked, probably the VS updated messed the emulator configs.

    Thanks.

    0 comments No comments

0 additional answers

Sort by: Most helpful