How to setup debugging and deploying from VS.NET to a Windows CE device over ActiveSync
To get the ActiveSync connection you must:
- Open the ActiveSync program on your development machine
- Start your Windows CE device
- Choose File/Get Connected on the ActiveSync program on your development machine while the device is starting.
- You must have the Windows CE Utilites installed which you can get from here:
To ensure that the device and your machine have an open connection to talk through you must:
- Copy the ConManClient.exe and all .dlls from C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\ConnectionManager\Target\wce400\{YOUR DEVICE TYPE HERE} into the \Windows folder on your WinCE device.
- Copy SDAuthUtilDevice.exe from C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities\Authentication Util\WinCE4\{YOUR DEVICE TYPE HERE} into the \Windows folder on your WinCE device.
- Copy CryptoAPIWrapper.dll from C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities\Authentication Util into the \Windows folder on your WinCE device.
- On the device, run the ConManClient.exe program and connect
- On the device, run SDAuthUtilDevice.exe and start an IP address which is visible from your development machine.
- On the development machine, run SDAuthUtil.exe and set up the device with the same IP address that you entered into SDAuthUtilDevice.exe on the device.
- Repeat step 1. For some reason the ConManClient.exe seems to stop and either vanish or morph into a non-CE program file!
- From VS.NET 2003 got Tools/Connect To Device; select WinCE Device and connect.
NOTES:
- When deploying from VS.NET to the device, you will always have to deploy twice because, the first time, it fails to deploy.
- These steps will often fail. When they fail, reboot the device and start afresh from Step 1. I call this: Plug-and-Pray debugging.