Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Cruising the Interstate with Windows Mobile 6 Development : Page 4

One benefit of choosing Microsoft technologies for your mobile apps is an integrated, streamlined development process. Find out how easy it is with this tutorial on the basics of developing Windows Mobile apps with the the .NET Compact Framework.

Deploying Your Applications
Once the debugging process is over, you need to package the application nicely so that users can install it on their devices. An easy way to package your Windows Mobile application is to create a CAB file so that you can transfer it onto the end user's device (using emails, a web browser, a memory card, and so on).

To start, add a new project to the current solution in Visual Studio 2008 (see Figure 9).

Figure 9. Deployment: Adding a new project to the current solution.
Figure 10. Drag and Drop: Moving the WindowMobileApp shortcut to the Start Menu Folder.

Select the Smart Device CAB Project template.

In the File System tab, right-click on Application Folder and select Add—>Project Output.

Select the WindowsMobileApp project and click OK. Then, right-click on the output item shown on the right-side of the File System tab and create a shortcut to it. Name the shortcut WindowsMobileApp. Right-click on the File System on the Target Machine item and select Add Special Folder—>Start Menu Folder.

Drag and drop the WindowsMobileApp shortcut onto the newly added Start Menu Folder (see Figure 10).

Right-click on the SmartDeviceCab1 project name in Solution Explorer and select Properties. Change the Configuration from Debug to Release. Name the output file Release\WindowsMobileApp.cab.

In Visual Studio 2008, change the configuration from Debug to Release (see Figure 11).

Figure 11. Configuration: Changing the project configuration from Debug to Release.
Figure 12. Your Application: The CAB file containing the application.

That's it! Right-click on the SmartDeviceCab1 project name in Solution Explorer and select Build. You will now be able to find the CAB file located in the \Release folder of the SmartDeviceCab1 project (see Figure 12).

You can now distribute the CAB file to your customers using the various media, such as FTP, web hosting, email, and so on. When the end user taps on the CAB file in File Explorer (on the device), the application will ask if s/he wants to install the application onto the device or onto the storage card (see Figure 13).

Figure 13. Download: Asking for a location in which to store the application.
Figure 14. Start: The installed application can be found and launched from the Start menu.

A Windows Mobile Foundation
There you have the bare-bones basics of Windows Mobile development and how to use Visual Studio 2008 to create a Windows Mobile application with .NET Compact Framework. Though this article didn't cover .NET CF's class libraries, it does cover the steps that you need follow in order to develop an application from start till the end, right through to deployment.

Wei-Meng Lee is a Microsoft MVP and founder of Developer Learning Solutions, a technology company specializing in hands-on training on the latest Microsoft technologies. He is an established developer and trainer specializing in .NET and wireless technologies. Wei-Meng speaks regularly at international conferences and has authored and coauthored numerous books on .NET, XML, and wireless technologies. He writes extensively on topics ranging from .NET to Mac OS X. He is also the author of the .NET Compact Framework Pocket Guide, ASP.NET 2.0: A Developer's Notebook (both from O'Reilly Media, Inc.), and Programming Sudoku (Apress). Here is Wei-Meng's blog.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.