Search code examples
visual-studio-2015visual-studio-emulator

How to set up visual studio 2015 in Hyper-v vm and connect to standalone VS android emulator


My Development environment: Visual Studio 2015(with Xamarin) - installed in virtual machine(Hyper-V) = VM1

Visual Studio Android Emulator - installed in the same physical box where VM1 is installed.

How do I configure VS2015 in VM1 so that I can debug the android app in the VS android emulator.

Emulator starts up ok and I can connect to Emulator from VM1 using below:

adb connect ip:5555
connectedd to IP:5555
adb devices
IP:5555 offline

why the emulator is offline. I have tried to kill the adb server and start again but problem still exist


Solution

  • I found the solution.
    In my case I have updated the Android SDK packages that the VS emulator uses in the physical box.If you have multiple version of SDK installed make sure to update the right one that the emulator uses. The VS emulator finds the Android sdk using the below registry key in the physical box: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools

    once the packages are updated, close the SDK manager. Now from the VM1 where the IDE(visual studio) is installed, launch the adb and issue following command
    adb kill-server
    adb connect ip(immulator):5555

    hurray the devices is online and visual studio also shows in the dropdown list.