Thursday 16 March 2017

Emulator Error - 'Object reference not set to an instance of an object'



Developing mobile app in Visual Studio requires Hyper-V to be installed on a Windows Machine.
Hyper-V creates virtual network interface in the Network Adapter setting. Generally it is named as "vEthernet (Windows Phone Emulator Internal Switch)" and created by Virtual Machine in the Hyper-V manager.

Error "The emulator is unable to connect to the device operating system: Object reference no set to an instance of an object. Some functionality might be disabled" usually a result of such Network adapter deletion or disconnection. So if you are not able to see it in the Network adapter setting. Follow the steps and see the snap taken below to recreate one.

  • Stop the emulator and delete existing Hyper-V virtual machine related to emulator.
  • Rerun the Emulator, it creates new virtual machine in the Hyper-V
  • Select the new machine, click on Virtual Switch Manager Option on the right side
  • Go to Windows phone Emulator and check for Internal Network. Click Ok.
  • Rerun the emulator and you will find the new Virtual Network Adapter. Also the error will not occur again.


No comments:

Post a Comment