1
votes

I am facing an issue connecting to a Windows Phone 8.1 emulator from Visual Studio.

Environment:

  • Windows 8.1 enterprise
  • Visual Studio 2015, update 2
  • Cordova 5.3.3

When the error occurs:

  • After creating a Cordova project (from the cmd line) for Windows 8 platform (which covers Windows Phone 8.1; not wp8 which covers only WP 7 and 8), I open it in Visual Studio, try to debug it on one of the Windows Phone 8.1 emulators which come with VS (targeted architecture: "Any CPU")

Error:

Right after or during the emulator boot:

  • Error message: "Bootstrapper could not connect to machine"
  • Two errors in the log of VS: "DEP6701: Boostrapping failed with unexpected error: 'Referenced package not found…" and "DEP0001 : Unexpected Error: DEP0001 : Unexpected error: -1988946668"

What I have tried:

  • Turned virtualisation off and on again in the BIOS
  • Ensured Hyper-V was enabled
  • Checked the emulator for "developer settings" or something similar, but didn't find anything - apparently not required at an emulator level, and anyway it seems unrelated to the error, which suggests VS cannot connect to the emulator
  • Changing the connection type of the WP emulator virtual switch in the Hyper-V manager: initially internal network, also tried private network and external network

I am new to Windows Phone development and am kind of out of ideas. Nothing I found on Stack overflow helped. The error seems to suggest the configuration of VS is not adapted to the emulator: it can't connect to it.

Any ideas would be greatly appreciated.

2
You created the WP project out of Visual Studio? Can you please try to create a new blank Cordova app in visual studio, and set solution platforms to Windows Phone (Universal) and select one of "Emulator 8.1 xxx" as the deployment target? Can you see the emulator starts up?Alan Yao - MSFT
(Just added extra details to my question) I had actually created the WP project from the command line. After trying your suggestion, everything works well. Seemingly, Visual Studio needed the Cordova tools to be installed to be able to communicate with the emulator. Thanks for pointing me in the right direction, Alan Yao.Chris Neve
Could you try setting the msbuild verbosity to verbose, rebuilding, and posting the log somewhere? The error you're seeing indicates a broken install. The diagnostic log should help us figure out what's missing. (Disclosure: I work on the Tools for Apache Cordova in Visual Studio)Michael Braude

2 Answers

1
votes

I am seeing the same issue and followed the suggestions above with no effect.

I am running VS2015 Community edition under VMWare Fusion 8.1 and Windows 10 (Windows Update reports all current patches are applied)

The emulator runs fine but the application fails to deploy/run with the same bootstrap error the original poster had.

Windows 10 (all configurations) work fine.

0
votes

Make sure you have installed the Windows Phone 8.1 SDK Update and Emulators, the VS2015 installer (at least the ISO) persists in offering its own obsolete emulators instead of retrieving the updated ones.

I'll never understand the VS2015 installer, it gets some new stuff from the web (like the July-2017 updated Android emulators) and it persists in showing some obsolete SDKs at the same time.