Deploying Smart Device Applications

This topic describes the two types of application deployment:

  • Deploying your smart device application to one device during development
  • Final application deployment after development is complete

Deployment During Development

Managed Code Applications

To include Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) in a managed Microsoft Visual Studio project, add a reference to the System.Data.SqlServerCe assembly. When this reference is added, three .cab files are automatically deployed to the smart device every time the application is compiled and deployed:

Native Code Applications

If you are developing an application in Microsoft Visual C++, SQL Server Compact Edition is not automatically installed when you deploy your application. You must first copy the SQL Server Compact Edition installation .cab file and install it on the smart device. The .cab file for SQL Server Compact Edition is named Sqlce30.platform.processor.cab and is located in the following directory:

C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\platform\processor

Note

If your application uses merge replication or RDA, you must also install the Sqlce30.repl.platform.processor.cab file.

Final Application Deployment

When your application is complete, and you are ready to deploy it to multiple devices, you create a .cab file for the application, and then use this .cab file to install the application to multiple devices. To create a .cab file for your application in Visual Studio, on the Build menu for your project, select Build CAB File.

The resulting .cab file contains only the binaries for your application. It does not include SQL Server Compact Edition or the Microsoft .NET Compact Framework. To fully deploy your application, you must copy and extract the SQL Server Compact Edition and .NET Compact Framework .cab files together with your application .cab file.

  • The .NET Compact Framework .cab file is named NETCFversion.platform.processor.cab. It is in the following directory:
    \Program Files\Microsoft Visual Studio 8\SDK\version\CompactFramework\WindowsCE\platform\processor
  • The .cab files for SQL Server Compact Edition are named Sqlce30.platform.processor.cab and Sqlce30.repl.platform.processor.cab. They are in the following directory:
    C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\platform\processor

For example, to include version 2.0 of the .NET Compact Framework and SQL Server Compact Edition in your deployment of an application you have developed for the Windows CE 5 operating system on an armv4 processor, you must include the following two files:

  • C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE\wce500\armv4\NETCFv2.wce5.armv4.cab
  • C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\wce500\armv4i\sqlce.wce5.armv4i.cab

Note

If your application uses merge replication or RDA, you must also install the Sqlce30.repl.platform.processor.cab file.

See Also

Reference

System.Data.SqlServerCe Namespace Overview

Help and Information

Getting SQL Server Compact Edition Assistance