
APPENDIX A Setting Up Your Development Environment: A Quick- Step-Through THIS MAY VERY WELL BE the shortest appendix in the history of publishing. Well, that may be an exaggeration, but this appendix will be short and to the point. The purpose here is to give you a feel for what you need to have installed to do a particular job in the world of .NET Compact Framework programming. The way to do that is to give you step-by-step instructions for what you need to do to get your environment up and running. Install a Decent Operating System By "decent," you might be thinking that I mean you shouldn't use Wmdows if you want a decent OS. Sorry, but no snide comments here! What I mean is you shouldn't use Windows 95 or Windows 98. Visual Studio 2003 requires you to use one of the following operating systems: • Wmdows XP Professional • Wmdows Server 2003 • Wmdows 2000 Professional (SP3 or later) • Wmdows 2000 Server (SP3 or later) It's possible to use Wmdows XP Home Edition, but if you do, you won't be able to write or host ASP. NET pages or Web services. 907 Appendix A Install Visual Studio .NET 2003 This should be obvious, but I want to be complete. It's also important to note that the .NET Compact Framework is part of the 2003 release ofVS .NET. The previous version, called the Smart Device Extensions, was provided as a separate add-on and installation to Visual Studio 1.0. For some "official" information on Visual Studio .NET 2003, you can check out either of these two Microsoft Web sites: • Visual Studio .NET Home Page-http:/ /msdn.microsoft.com/vstudio/ • Support Center for Visual Studio-http: I I support. microsoft. com/ default.aspx?scid=fh;EN-US;vsnet Install ActiveSync ActiveSync is the software that synchronizes the data from your desktop com­ puter to your PocketPC. Download the latest version of ActiveSync from http://www.microsoft.com/downloads/details.aspx?FamilyiD=67e9e87c-ca96-48b4- bSd4-f3e047ca5108&displaylang=en and install it on your computer. And really, that's all that is required to get started. The remaining tools you need are included in Visual Studio 2003. Of course, you may want to install some optional packages, and we'll discuss those next. You might also find a significant number of "toys" and other downloads interesting. The last portion of this appendix will contain links to some of those items. Install SQL Server and SQL Server CE If you don't plan on using SQL Server or SQL Server CE, then you don't have to worry about this section. But if you have a desire to use SQL CE by itself or to synchronize data with SQL Server, then this might be worth reading. With the problems that exist from a variety of hacking attempts and suc­ cesses, everyone should have the latest service pack for SQL Server installed. At the time of writing, that is SP3. As was discussed in Chapter 11, installing SQL CE over SP3 can get a bit dicey. You can find a description of SP3 and a link to down­ load it from this Web site: http: I lwww. microsoft. com/ sql/downloads/2000/ sp3. asp. Now, when you install SQL CE 2.0, you have to install client and server tools. If you installed SP3, then you can use the SQL CE installation for client tools, but you must install a service update on the server that is hosting liS. The following links point you to the important pages on the Microsoft Web sites that provide detailed information: 908 Setting Up Your Development Environment: A Quick Step-Through • General SQL CE site-http: I /www. microsoft. com/ sql/ eel • SQL CE 2.0 download site-http: I /www. microsoft. com/ sql/ eel downloads/ ce20.asp • SQLEC service update-http: I /www.microsoft.com/sql/downloads/ce/sp3 .asp When you install these upgrades, they will bring your Microsoft Data Access Components (MDAC) up to version 2. 7. Install the eMbedded Tools No, I don't know why Microsoft capitalizes the M and not the e. But I do know that you should install eMbedded Visual Tools 3.0 on your development machine. If you've previously used the embedded tools, you know that they include a vari­ ety of tools that let you look at processes, files, and other details of the emulator or device. These tools aren't included in Visual Studio 2003, and in time you'll need them for debugging or curiosity, whichever comes first. You can set up the Tools menu in Visual Studio to launch the utilities from right inside the IDE. The SDKs that get installed with the tools also provide you the header files that can be used to build your own Declare or Dllimport statements to call unmanaged code. TWo versions of the eMbedded tools are currently available. Version 3.0 is the old standby that has been used for years to write applications for devices. The new kid on the block is eMbedded Visual C++ 4.0. This version, with Service Pack 2 installed, lets you target Windows CE 4.0, 4.1, and 4.2. At this time, Visual C++ 4.0 doesn't have an SDK to allow you to target the Pocket PC or Smartphone. Following are the URLs you'll need to access and learn more about the eMbedded Visual Tools: • eMbedded Visual Tools Web site­ http://msdn.microsoft.com/vstudio/device/embedded/default.aspx • eMbedded Visual Tools 3.0- http://www.microsoft.com/downloads/details.aspx?Family!d=F663BF48-31EE- 4CBE-AACS-OAFFDSFB27DD&displaylang=en • eMbedded Visual C++ 4.0- http://msdn.microsoft.com/vstudio/device/embedded/datasheet.aspx • eMbedded Visual C++ 4.0 SP2-http: I /microsoft. com/ downloads/ details.aspx?Family!d=CE7F1AAA-54EB-4989-812B-7F95560SDCB8&display­ lang=en 909 Appendix A Once you digest all of the preceding Web sites and pages, you can get a gen­ eral overview of application development for devices from the following site: • Device development overview-http: I lmsdn. microsoft. comlvstudiol deviceloverview.aspx Summary This short appendix covers everything you need to get started. There are many sites that you can visit for downloads, help, and tools. Rather than add a large list of URLs here that you would have to type in by hand, you can get a list of links at either http: I lwww .larryroof. com or http: I lwww. forestsoftwaregroup. com. Appendix D tells you the exact location of these sites, from which you can also download ver­ sions of the source code. 910 APPENDIX B Working with the Emulator THE Focus OF THIS APPENDIX is to show you how to get the most out of the emula­ tor. Before we get started, let me say that I'm not a big fan of emulators. Obviously, if you don't have a device, they're your only option. While I may grant this con­ sideration for students, I can't see any possible scenario in which corporate or commercial developers would be without a device. The obvious and most important reason for testing on a device is that no matter how good a job the emulator does, it isn't a device. You don't interact with an emulator using a stylus; you use a keyboard and mouse. You don't hold it in your hand; it sits on your virtual desktop. It has different processor capabilities. With that said, I have to tell you that I have from time to time used the emu­ lator. In situations where you don't want to hook up a device, such as on an airplane, the emulator is a nice alternative. Additionally, the emulator provided with the Smart Device Extensions is a vast improvement over previous Pocket PC emulators. Launching the Emulator You can launch the emulator in two ways: from within the Visual Studio .NET IDE and from the command prompt. Launching the Emulator from Within VS .NET There are two ways to launch the emulator from within the Visual Studio .NET IDE. The first way is as follows: 1. Start a Smart Device Extension project. 2. Select Pocket PC 2002 Emulator from the Deployment Device combo box, which is located on the toolbar. 3. Run your application. 911 AppendixB The emulator will be automatically loaded in preparation to running your application. The second way to launch the emulator is to attempt to establish a connec­ tion to the emulator from within the Visual Studio .NET IDE. This can be accomplished by clicking the Connect to Device button, which is located on the toolbar, or through the Connect to Device menu item on the Tools menu. , ·1 ; TIP To speed the development process, it's best to leave the emula­ tor open and running between builds and tests ofyour application. I've found that the slow start time of the emulator interferes with the build, test, refine, and repeat development process. Launching the Emulator from the Command Prompt To launch the Wmdows CE emulator from the command prompt, perform the following steps: 1. Open the command prompt. 2. Either define the path to, or navigate to, the directory where the emula­ tor executable resides. By default, the emulator resides in the following directory: C:\Program Files\MicrosoftVisual Studio .NET 2003\ CompactFrameworkSDK\ConnectionManager\Bin. 3. Enter the command emulator, along with any command-line argu­ ments, and press Enter. The emulator will start. Table B-1 shows command line arguments for the emulator application.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages103 Page
-
File Size-