Tuesday, March 29, 2005

CF : Error: Cannot establish a connection ...

Irritating error: "Error: Cannot establish a connection. Be sure the device is physically connected to the development computer."

This may help:

You need to download and install Microsoft Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1 on your development PC running Visual Studio. Get it from here:


Then read through the solutions listed in the Readme.htm file in the:
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities folder.

You may need to run C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities\WinCE Proxy Ports Reg\ProxyPorts.reg.

Also: In Visual Studio under "Device Options", ensure that the "Transport" is "TCP Connect Transport" and that you "Obtain an IP address automatically".

Then start ActiveSynch, inside your project go to Tools\Select Windows CE Device CPU and select ARMV4T or whatever your CPU is. Then deploy to the device and you should be able to debug on the device.


(Compact Framework)

CF : Downloading a file to the emulator

Perhaps the simplest way is to add the file as "Content" to your project using Solution Explorer and then deploy the project to the emulator. Then find the file and run it.

Note: "Left Slash" = /, "Right Slash" =
In Windows CE, copy the file to a shared directory on your desktop and then using the "Run" command, execute

"Right Slash""Right Slash"Desktop"Right Slash"Share.

Then either run the file direct or copy / paste to a directory inside the emulator and then run it.

In PPC, use IE and type

file:"LeftSlash""LeftSlash""Right Slash""Right Slash"Desktop"Right Slash"Share and follow the same procedure.

Alternatively, use "File Explorer/Open" and then

""Right Slash""Right Slash"Desktop"Right Slash"Share

You can also use "Emulator ActiveSync Connection Tool - Allows Activesync to connect to your Emulator session from Visual Studio .NET 2003" from "Windows Mobile Developer Power Toys" available here:


(Note: There are two downloads. You need to download "EmuASConfig.msi").

Once connected via ActiveSync, you could use "CECopy - Command line tool for copying files to the device currently connected to desktop ActiveSync" also available from the Power Toys link above.


(Compact Framework)

Wednesday, March 23, 2005

SQL CE : Merge Replication

Two useful articles that have helped me:

How to Program Microsoft SQL Server CE 2.0 Merge Replication Using .NET Compact Framework


Developing Apps with the .NET Compact Framework, SQL Server CE, and Replication