如何在Visual Studio2005里调试Windows Mobile5

来源:互联网 发布:网络销售怎么写月计划 编辑:程序博客网 时间:2024/05/18 19:42
想要调试Windows Mobile5(WM5)里的程序,真是废了一番功夫。手头只有visual Studio2003,不行,WM5只支持VS2005。处地偏远,暂时弄不到VS2005,只好去微软下VS 2005 Express,这是专门给学生等穷人用的免费版,功能基本完全,只是各种语言是分开的。
1, 先下了一个C#的部分(400多兆的ISO啊),再去下载Windows Mobile 5.0 SDK for martphone:http://www.microsoft.com/downloads/details.aspx?familyid=DC6C00CB-738A-4B97-8910-5CD29AB5F8D9&displaylang=en
装完了 VS 2005 Express,确发现Windows Mobile 5.0 SDK for martphone不能安装,找了半天,在微软的论坛里发现这么一句话:The Express Editions do not support Mobile Device development. You have to install at least Visual Studio 2005 Standard Edition. 晕死,白下了。老板又拿来一个VS2005Beta版,兴匆匆安上,连程序都打不开--过期了。
没办法,只好等了几天,才弄到VS2005的正式版,不容易啊,安装好VS2005后,再安装
Windows Mobile 5.0 SDK for martphone就没有问题了。但是还要安装Windows Mobile 5.0 SDK for martphone Pocket PC, 进http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED&displaylang=en一看,竟然要收费了。难道就这么被微软剥削吗?不,劳动人民是有办法的。
去http://msdn.microsoft.com/windowsmobile/downloads/resourcekit/default.aspx下载Windows Mobile 5.0 Developer Resource Kit,这是一个WM5的工具包,里面有如下不少好冬冬:
    * Visual Studio 2005 Professional Edition (90-day trial)*(假的,骗人,根本没有,也用不着了)
    * Windows Mobile 5.0 SDKs for Pocket PC and Smartphone
    * ActiveSync 4.1
    * .NET Compact Framework 2.0
    * Localized emulator images(也没有) and other useful developer tools
    * SQL Server 2005 Mobile Edition
看到没,Windows Mobile 5.0 SDKs for Pocket PC。不过很大,900MB,为了免费,忍了!
下完以后安装完后找到安装目录,进 ..usr/Windows Mobile 5.0 Developer Resource Kit/content/Developer Tools/Windows Mobile 5.0 SDKs Tools,就可以安装Windows Mobile 5.0 SDK for Pocket PC.msi了。Developer Tools里还有ActiveSync 4.1,这是让PDA真机和电脑联机的软件,当然,可以去http://www.microsoft.com/downloads/details.aspx?familyid=7269173A-28BF-4CAC-A682-58D3233EFB4C&displaylang=en下载ActiveSync 4.2最新版本。
content里还有很多实例和教程,不可多得的资料啊。900MB没白下。
如果如果要安装中文版的模拟器还要安装Windows Mobile 5.0 Emulator Images,Smartphone的在这里:http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=52fed581-8f8d-4c46-9966-4832098191b7
下载相应的。
For PocketPC的还没找到免费的,谁可以提供连接?

下面就是VS2005里的界面。(不能上传图片?)

2,如果想让WM5模拟器连上网络,怎么办?

在http://www.microsoft.com/downloads/details.aspx?familyid=DC8332D6-565F-4A57-BE8C-1D4718D3AF65&displaylang=en下载Virtual Machine Network Driver for Microsoft Device Emulator,模拟网络连接。



3,如果不想装VS2005,只想装一个WM5的模拟器,怎么办? 微软还是很周到的,下载 Microsoft Device Emulator 1.0,地址:http://www.microsoft.com/downloads/details.aspx?FamilyId=C62D54A5-183A-4A1E-A7E2-CC500ED1F19A&displaylang=en。
默认安装路径:
C:/Program Files/Microsoft Device Emulator/1.0(不能选择安装路径)。
然后就可以选择模拟器运行了。

4,如何调试模拟器上网。
参照下图步骤:
First "Settings" then "Connections"


Then select "Advanced", then "Selected Networks" then in the first drop down select "My Work Network"

好了,可以上网了


5, Microsoft Device Emulator 2.0 Beta - Community Technology Preview,下载地址http://www.microsoft.com/downloads/details.aspx?familyid=13F5DE85-30CD-4506-9C5B-A2068FA1EE9E&displaylang=en这是包含Windows CE 6.0新特性的模拟器,可以试试。



Reference:
http://www.jasonlam604.com/tipshints_mobile5_standalone_emulator.php
http://news.csdn.net/news/newstopic/22/22102.shtml

 
原创粉丝点击