Connectivity Troubleshooting (Devices)
Most connectivity difficulties between the development computer and a device result from either security or network issues. The following sections help you identify and resolve some of the more common connection issues and provide steps to establish reliable and secure connections.
Use the direct memory access (DMA) transport that Visual Studio provides for connecting to the Device Emulator. This transport eliminates most connection issues between the development computer and the emulator.
Use the TCP/IP transport only if you have a specific reason. To resolve issues that stem from the use of TCP/IP with the emulator, review the steps that follow. For more information, see the Mobile Developer Center.
Failed to Open Virtual Switch Driver
If you are trying to connect the Device Emulator to a network by using the emulated NE2000 or CS8900 card, you need a virtual switch driver. You can download a driver from the Mobile Developer Center.
An error opening the driver can occur for several reasons:
Lack of driver.
The network card on the development computer does not have the driver installed.
There were problems during the installation of the driver.
The driver is in a disabled state.
The development computer does not have a network card.
Use the following steps to diagnose the precise cause.
To diagnose the precise cause of the failure
Look on the Network tab of the Emulator Properties dialog box.
If the NE2000 and/or the CS8900 cards are enabled, verify that the network cards to which they are bound are present and connected. To open the Emulator Properties dialog box, click Configure on the File menu of the Device Emulator.
Look at the network properties of the adapter to verify that the item Virtual Machine Network Services is present, enabled, and of the correct version, which is 2.6.465.224 or later versions.
If these steps do not fix the problem, reinstall the driver.
Deployment to Emulator Error
If your development computer has a wireless network connection and you are using the TCP transport, you might need additional steps, such as installing the Microsoft Loopback Adapter. For more information, see the Mobile Developer Center.
Unless you have a specific reason to use the TCP Transport, use the DMA transport to avoid network issues.
Cannot Debug After Switching Transports
You can change the transport for the emulator, but the emulator does not bind to the new transport until you soft-reset the device.
The DMA transport is the preferred transport for the Device Emulator. Use the TCP/IP transport only if you have specific reasons for doing this.
To switch transports
On the Visual Studio Tools menu, click Options, click Device Tools, and then click Devices.
Select an emulator, and then click Properties.
In the Transport box, select a different transport.
If you are switching to TCP/IP, click Configure to set additional options.
Click OK to close the dialog boxes.
Cannot Connect to Emulator While Running in Virtual PC Session
You can avoid this connection issue by using the DMA transport for the emulator. For more information, see How to: Connect to the Device Emulator From a Virtual PC Session.
Repairing the Device Emulator Installation
Errors indicating a failure to connect to the Device Emulator are typically not installation errors. However, you can follow these steps to repair the Device Emulator installation. To do this, you need your original installation media. Repairing your Visual Studio installation does not repair the Device Emulator installation.
To repair the Device Emulator installation
Navigate to wcu\ARM on your original Visual Studio installation media.
The location of this folder, such as Disk 1, Disk 2, and so on, varies with your edition of Visual Studio.
Double click vs_emulator.exe to open the Device Emulator Setup Wizard, and then follow the instructions.
The Device Emulator independent Help system provides additional tips. For more information, click the Device Emulator Help menu and look for "Troubleshooting Connection Issues" on the Content or Index tabs.
Lack of Proper Certificates on Device
Some devices, including Smartphone 2003 and later, require appropriate certificates to be installed on the device for security reasons. Certificates for day-to-day development work are included in Visual Studio, together with a tool to install them.
To install the required certificates
Connect to the device by using whatever connection mechanism you have available.
Copy VSDCerts.cab from the development computer to the device.
By default, VSDCERTS.cab is located at drive:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools.
On the device, explode VSDCerts.cab to install the certificates.
Lack of Prepping Windows CE 5.0 Device
Windows CE 5.0 devices that do not have ActiveSync support require preparation steps before a connection can be established to a Visual Studio instance. For more information, see How to: Connect to Windows CE Device Without ActiveSync.
Unexpected Behavior during Deployment
If the development computer is connected to a device through ActiveSync and you then try to make a TCP/IP connection with, for example, a Windows CE device, and a connection error occurs, the development computer connects with the ActiveSync-connected device, and does not warn that the TCP/IP connection failed.
Connection Fails After Accepting Prompt on the Device
This problem occurs most frequently on Smartphone or Windows Mobile 6 Standard devices with the two-tier prompt security configuration. When Visual Studio connects to a physical device, it must deploy and execute core connectivity files on the device. In this case, if the device does not have the VSDCerts certificates installed, the user is prompted to allow execution of the Visual Studio core connectivity files. The connection fails even after you accept the security prompt because two-tier devices grant normal execution permissions and Visual Studio core connectivity files must execute with privileged permissions.
To resolve this problem, either install the required Visual Studio SDK certificates or change your device to a one-tier security model.
Visual Studio 2005 Fails to Connect to Device after Installing Visual Studio 2008
Installing Visual Studio 2008 overwrites the Visual Studio 2005 version of Core Connectivity with a newer version of Core Connectivity that is signed with a new certificate and remains on the desktop computer even after Visual Studio 2008 is uninstalled. Because Visual Studio 2005 uses Core Connectivity to connect to devices, the device must have both Visual Studio 2008 (drive:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools\VSDCerts.cab) and Visual Studio 2005 (drive:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SDKTools\sdkcerts.cab) certificates installed. To install the certificates, copy the CAB files to the device and explode them by selecting them from File Explorer.
Although Visual Studio supports the use of wireless technology to connect to devices, wireless technology introduces additional factors that can adversely affect a successful and maintainable connection. These factors include misalignment of IR ports, obstruction or degradation of signal in RF connections, and so on.