Click here to Skip to main content
Click here to Skip to main content
Go to top

Demonstration of Windows Mobile App without Visual Studio

, 27 Jul 2009
Rate this:
Please Sign up or sign in to vote.
Ways to demonstarte any Windows Mobile Application through emulator with out Visual Studio

Background

Just recently I have started working on Windows Mobile and was assigned with a task to install an existing application in one of the systems with out Visual Studio 2005 or 2008. This was required for a demo purpose. Before I start describing the process, I would mention few details on - how Windows Mobile Application is tested.
For people looking for some details on designing or developing Windows Mobile Application, this is not ment for that. This would help the people who wants to know ways of testing Windows Mobile Applocations. You can not expect to have Visual Studio installed in your client system where you want demonstrate your application!!

How Windows Mobile Applications can be tested with Visual Studio

To test/execute any Windows Mobile application you should be having an Microsoft Device Emulator in case you do not have the actual device (which I assumed through out the article). This emulator would load the application and give you the same kind

Hello World application is loaded in Device Emulator

Hello World application is loaded in Device Emulator

of virtual look and feel as device would do. In development system, you can start coding in Windows Mobile Application by selecting the type of the project and the target platform. Now from your visual studio you can create any Mobile app (say any Hello World) and execute through Microsoft Device Emulator which is invoked through the Visula Studio itself. You actually do not even need to bother what Visual Studio is doing behind the scene to load application in the emulator.

Select SmartDevice Project option

Select SmartDevice Project option

Select the Compact Framework version and Target Platform

Select the Compact Framework version and Target Platform

Now when you do not have the Visual Studio installed in your system (which means you do not have the Microsoft Device Emulator installed also) then the probelm comes. In following sections I would describe how you can execute or test your application in an Emulator directly without Visual Studio.

CAB Deployment

Create a Smart Device CAB project for deployment

Create a Smart Device CAB project for deployment

The deployment unit for a Windows Mobile application is a CAB file created on top the application. I would cover the packaging and deployment of Windows Mobile application in one my coming posts. For the time being you can create a Smart Device CAB project and add the Project Output of the Windows Mobile applications in the Application Folder. Just as an information, our main target is now to install this CAB in the Emulator to get the application installed.

Loading Applications through Emulator without Visual Studio

There are two ways which you can follow. In both the cases, Visual Studio will not be any dependency to execute the application in an emulator.

Option 1

This approach would store the state of the emulator in some developer’s system. Then loading the same state in the target system (the testing system with out Visual Studio).

1. Start the emulator in developer’s system from command line. Also provide a file (EmulatorState.dess) where the state can be stored - “C:\Program Files\Microsoft Device Emulator\1.0\DeviceEmulator.exe” “C:\Program Files\Windows Mobile 6 SDK\PocketPC\Deviceemulation409\PPC_USA.BIN” /memsize 128 /s “d:\EmulatorState.dess”

2. Once the emulator is opened, save the state (File -> Save State and Exit). This would save the state in EmulatorState.dess file.

3. Copy the EmulatorState.dess file to the target system (suppose “d:\EmulatorState.dess”). Now install the Microsoft Device Emulator 3.0 Standalone Release to the target system.

4. Now run the Device emulator manager (C:\Program Files\Microsoft Device Emulator\1.0\dvcemumanager.exe). Open the file (”d:\EmulatorState.dess”) by File -> Open from Device Manager. The same step can be done through the command line by invoking device emulator - “C:\Program Files\Microsoft Device Emulator\1.0\DeviceEmulator.exe” /s “d:\EmulatorState.dess”

Create a share folder for Emulator

Create a share folder for Emulator

5. Now the application to be installed in the emulator. From the Emulator select File -> Configure. In the General tab, select the Shared Folder (suppose C:\ShareFolder) in the target system. Now keep the cab file (created on top of the mobile application) in that shared folder.

Use the storage card in Emulator to access the shared folder in your desktop

Use the storage card in Emulator to access the shared folder in your desktop

You can browse to same cab file in the emulator by Start -> Programs -> File Explorer. In the File Explorer select “Storage Card” from dropdown in the top section. Now you can click the cab file to install in the emulator.

Option 2

This approach needs installtion of Emulator and the images of Windows Mobile 6 in the target system (where you donot need Visual Studio).

1. Install the Standalone Device Emulator 1.0 with Windows Mobile OS Images. I tried with the Microsoft Device Emulator 3.0 Standalone Release also.

2. Now install the the Windows Mobile 5.0 MSFP operating system images (efp.msi file which is in the same link of Standalone Device Emulator 1.0 with Windows Mobile OS) that you can use with the Device Emulator. Also, you can have the different images for Windows Mobile 6.0 (Standalone Device Emulator 1.0 with Windows Mobile OS). This phase of installion would help you to run the emulator with proper mobile like images.

3. While installing the point 2 items you might need to install the Microsoft Virtual PC 2007 which contains the required network drivers that the emulator uses.

4. Now you can launch the emulator from Start -> Programs -> Microsoft Windows Mobile 5.0 MSFP Emulator Images or Start -> Programs -> Windows Mobile 6 SDK. In both the case share your folder to execute the cab file as mentioned in the 5th point of Option 1.

I hope this might help you all from Googling and doing some R&D work. I would soon post another interesting item on deployment of this mobile applications.

I revisited this post to elaborate it based on the comments received. Keep sending your feedback.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Arindam Sinha
Software Developer (Senior)
India India
I have been working in IT industry for the last 6 years.
My comfort zone is .NET and Microsoft technologies.

Comments and Discussions

 
GeneralMy vote of 1 PinmemberVivekanandanM2315-Oct-09 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 27 Jul 2009
Article Copyright 2009 by Arindam Sinha
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid