Visual Studio Xamarin and Android emulator without internet connection

I am developing a Xamarin project using Visual Studio 2015.

The problem is that I cannot start the Android emulator from Visual Studio using the Internet. I am for the proxy.

Using HttpWebRequest , I get an error:

System.Net.WebException: Error: ConnectFailure (network unreachable)

I check the emulator and have not found an internet connection:

enter image description here

I managed to start the emulator by installing proxy / dns using the command line (using emulator.exe -avd avdName -dns-server 192.168.1.1 ), but not from Visual Studio.

My question is: is there a way to set the proxy / dns configuration for Android Emulator from Visual Studio or to any configuration file, for example .ini or config.ini in the Avd folder, or in any other way?

+2
source share
2 answers

I am sure you have resolved your problem since then, but I ran into the same and found the following solution:

In settings / projects / Android just set -dns-server 8.8.8.8 to "additional arguments to start the emulator" (not sure how this translates in English, though).

Xamarin Visual Studio Community Settings (Screen Capture)

+2
source

You need to create a new virtual external adapter in the Hyper-V administrator. Click "virtual switch manager" and add an external one with your current connection. Then, once you have done this, you need to go to the settings of the virtual machine and add the external adapter that you created earlier.

I installed two screenshots to view my configuration.

Virtual Switch Manager details

VM Settings

0
source

All Articles