Export (0) Print
Expand All

IDE Features Supporting Device Application Packaging 

To package a solution for deployment to Smart Devices, you use the same or similar Microsoft Visual Studio 2005 integrated development environment (IDE) features that you use for desktop solutions. These features are described in the following table.

Feature How to Find Remarks

Smart Device CAB project template

On the File menu, point to Add, click New Project, click Other Project Types, and then click Setup and Deployment.

Click on this icon to add a new CAB project to your existing solution. Note that this is the only project type in this dialog box that is valid for Smart Devices. After you select a name for the CAB project and click OK, the project is added to the solution and is displayed in Solution Explorer.

File System Editor

Right-click on the CAB project name in Solution Explorer, click View, and then click File System

Use this editor to specify which files to add to the CAB and the device folders into which they should be installed.

Registry Editor

Right-click the CAB project name in Solution Explorer, click View, and then click Registry.

Use this editor to specify any special registry keys required by your application.

Properties Window for the CAB project

Select the CAB project in Solution Explorer, and then click Properties Window on the View menu.

Use this window to specify the name, if you have one, of your CE Setup DLL, the manufacturer name of your application, the minimum and maximum versions of Windows CE that your application is designed to run on, and other options.

Project Property Pages

Right-click the CAB project name in Solution Explorer, and then click Properties.

Use this dialog box to specify configuration (for example, Debug), output file name, and security certificates.

NoteNote

Because these same editors are used for desktop setup projects, some options may be disabled for Smart Device CAB projects.

In some cases, you may write an application that is only designed to run on particular platforms, such as Windows Mobile 2003 SE and later. In these cases, you can prevent your CAB file from installing on the unsupported platforms that you specify, but to do so you must manually edit the INF file, then repackage the cab using command-line tools. If you repackage the CAB using Visual Studio, your changes will be overwritten.

Pocket PC vs. Smartphone

On Windows Mobile 2003 SE and earlier, the primary difference between CAB files for Pocket PC and those for Smartphones is that Pocket PC does not support compressed or signed CAB files. Smartphone CAB files must be compressed and both the .exe or .dll file and the CAB file itself must be digitally signed before they can be installed on the device. For more information, see Security in Device Projects.

Native vs. Managed Applications

The only difference between creating a Smart Device CAB project for an application written in C++ compared to one written in Visual C# or Visual Basic is that with native applications, you must manually add the system dependencies, atl80.dll, mfc80U[d].dll, and/or msvcrt[d].dll, to the CAB project. For managed applications, you will never add any .NET Compact Framework DLLs to your CAB file. If you are targeting version 1.0, then all the DLLs are already present on any device based on Windows Mobile 2003SE and later. If you are targeting version 2.0 of the .NET Compact Framework, then you will need to determine whether the device already has that version installed. You can do this by writing a Windows CE Setup DLL that checks for the version of mscoree.dll on the target device. If version 2.0 of the .NET Compact Framework is not present, then you can deploy the appropriate CAB that is provided with Visual Studio under the Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\WindowsCE path. You can either deploy this CAB separately from your application CAB, or you can embed it inside your application CAB.

Caution noteCaution

When you redistribute a native application that dynamically links to MFC/ATL, and deploy the MFC/ATL runtime DLLs to the application directory, the application may not link to the DLLs in that directory. On Windows CE, if two DLLs have the same file name but different paths, only the first DLL with that file name is loaded. Subsequent DLLs with the same file name are not loaded. Instead, the application links to the DLL with that file name that had previously been loaded by another application.

To ensure that the application links against the DLLs in its directory, make sure that no other applications are using DLLs by the same file names.

Smart Device vs. Desktop Deployment

Both desktop and device setup projects can be accessed in the New Project dialog box, by clicking Other Project Types, and then clicking Setup and Deployment. When deploying a desktop application, you have the choice of Setup Project, Merge Module Project, Cab Project, Web Setup Project, and Setup Wizard. None of these project types can be used for device applications. ClickOnce deployment is not supported for Smart Devices. To create a CAB file for deployment to any Windows CE-based device, including Smartphone and Pocket PC, you must use the Smart Device CAB Project.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft