如何在没有 ActiveSync/WMDC 的情况下使用 TCP/IP 将 Visual Studio 2008 连接到 SmartDevice
远程文件
您需要以下 VS2008 Windows Mobile SDK 安装文件:
ClientShutdown.exe
cmaccept.EXE
ConManClient2.exe
eDbgTL.dll
TcpConnectionA.dll
更改设备上的注册表项 HLKM\System\CoreConOverrideSecurity=DWORD:1
您需要的文件位于(取决于设备上的 Windows CE 版本):
Windows CE 4.2、Windows CE .NET、Windows Mobile 2003、PocketPC 2003:C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\target\wce400\armv4i
对于 Visual Studio 2008 和基于 Windows CE 5 的 SDK,您可以使用 ftp \hjgode.de\temp\rdb2008.exe 工具(在以下示例中使用)或原始rdb2008.exe源。
检查设备的IP

在设备上启动 rdb2008.exe

**在 rdb2008 中按 [Prepare] 将提取文件并设置 reg 条目

准备VS2008
确保您使用匹配的 Windows Mobile SDK。您也可以在 Windows Mobile 6.5 Classic 设备上使用 Windows Mobile 6.5 Professional SDK。或者,您将 Window Mobile 6 SDK 与 Windows Mobile 6.5 Classic 设备一起使用。只需为设备使用适当的 SDK。
设置VS2008远程设备IP和端口
选择工具-选项-设备工具-设备
在此处选择合适的平台(显示平台设备)!但如前所述,匹配基本操作系统(Windows CE 5)就足够了。
选择正确的平台后,选择一个设备(无仿真器),然后单击 [另存为]
输入 RemoteDebug 作为新名称。
现在在设备中选择新的 RemoteDebug 保存条目...

...并单击[属性]:

现在输入文件部署目录(此处为:“\Program Files”)。确保 Transport 是“TCP Connect Transport”,然后单击 [Properties]

确保使用固定端口 5655,然后输入远程设备的 IP 地址!
现在使用 [OK] 按钮关闭所有这些选项对话框。
测试连接
在 VS2008 中确保平台和设备处于活动状态:

现在单击 VS2008 菜单中的工具,然后单击“连接到设备”

再次检查平台和设备,不要点击[连接]:

现在在设备上:在 rdb2008 中单击 [开始]:

你看rdb2008说监听5655端口!
现在点击VS2008中的【连接】:

希望您得到上述对话框并继续进行另一次测试。单击[关闭]。
在 VS2008 中选择 Debug-Attach 来处理:

选择 Transport=SmartDevice 并单击 Califier:[Browse] 并再次选择使用的平台和设备“RemoteDebug”:

如果成功,您将看到设备上正在运行的进程列表。