Deploying Windows Phone 8.1 application to a device in Visual Studio 2015 does not work due to missing sshclient.dll | Joachim De Zutter
January 2017

Environment:
Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3
Windows Phone SDK 8.0 - ENU 00322-20000-00000-AA745

When trying to deploy a built Windows Phone 8.1 *.xap file to a developer unlocked device (with Krait CPU) in Microsoft Visual Studio 2015, the following output is displayed :

Deployment of application to device failed.
Error: The specified module could not be found.

When trying to deploy the application from the command prompt we get :

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy>AppDeployCmd.exe /installlaunch <.xap filename> /targetdevice:de
Error: The specified module could not be found.

Apparently the sshclient.dll file was missing under "C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Phone Sirep\8.1\", so we could execute the following in a command prompt with administrator privileges :

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy>copy "C:\Program Files (x86)\Windows Kits\10\bin\x86\sshclient.dll" "C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Phone Sirep\8.1\sshclient.dll"

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy>AppDeployCmd.exe /installlaunch <.xap filename> /targetdevice:de
Done.
(we see the application launching on the phone)

But since the copying of the sshclient.dll file, devenv.exe crashes when trying to deploy the application in Visual Studio 2015:
Problem signature:
P1: devenv.exe
P2: 14.0.25420.1
P3: 57685d85
P4: StackHash_2beb
P5: 0.0.0.0
P6: 00000000
P7: PCH_45_FROM_ntdll+0x0006EB8C
P8: c0000005
P9: 00000008
P10:

Faulting application name: devenv.exe, version: 14.0.25420.1, time stamp: 0x57685d85
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x124272bc
Faulting process ID: 0x215c
Faulting application start time: 0x01d27325e8c210a1
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe
Faulting module path: unknown
Report ID: b193cb60-5636-435f-a2a1-7399d759008a
Faulting package full name:
Faulting package-relative application ID: 
So we delete the sshclient.dll file in a command prompt with administrator privileges :

C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy>DEL "C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Phone Sirep\8.1\sshclient.dll"

Uninstalling Microsoft Visual Studio 2015, installing Microsoft Visual Studio 2015 without update 3 and then installing update 3 resolved the issue although there was no sshclient.dll under C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Phone Sirep\8.1\, apparently sshclient.dll was no longer required by AppDeployCmd.exe because the *.xap file is now transferred via TCP ports 29820 (WPConProtocol2) and 6891.
C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.1\Tools\AppDeploy>CD C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\bin
C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools\CoreCon\11.0\bin>IpOverUsbEnum.exe
Partner:
...
  Name: Windows Phone 8
...
Partner Services listening at ports:
  Debugger 8888 -> 127.0.0.1:8888
  DeviceReg 27177 -> 127.0.0.1:27077
  Msvsmon 8016 -> 127.0.0.1:8016
  Msvsmon00 8116 -> 127.0.0.1:8116
  Msvsmon01 8117 -> 127.0.0.1:8117
  RPCSurrogate00 6610 -> 127.0.0.1:6510
  RPCSurrogate01 6611 -> 127.0.0.1:6511
  RPCSurrogate02 6612 -> 127.0.0.1:6512
  RPCSurrogate03 6613 -> 127.0.0.1:6513
  RPCSurrogate04 6614 -> 127.0.0.1:6514
  RPCSurrogate05 6615 -> 127.0.0.1:6515
  RPCSurrogate06 6616 -> 127.0.0.1:6516
  RPCSurrogate07 6617 -> 127.0.0.1:6517
  RPCSurrogate08 6618 -> 127.0.0.1:6518
  RPCSurrogate09 6619 -> 127.0.0.1:6519
  Ssh 1022 -> 127.0.0.1:22
  VSCodedUITestFramework 6621 -> 127.0.0.1:6621
  VSGraphicsRemoteEngine 8119 -> 127.0.0.1:8119
  VSUnitTestFramework 6620 -> 127.0.0.1:6620
  WPConManClient2Proxy 6891 -> 127.0.0.1:6791
  WPConProtocol2 29820 -> 127.0.0.1:29820
  WPPingSirep 29819 -> 127.0.0.1:29819
  WPSirep 29917 -> 127.0.0.1:29817
  WpPerfMon 8889 -> 127.0.0.1:8889