Creating a Message-based Mobile Application Project Using the SybaseMobileApplication Template

Create a message-based mobile application project in Visual Studio using the SybaseMobileApplication template, which allows you to write C# device applications.

Prerequisites
To install the template, select Windows Mobile .NET Components during the Sybase Unwired Platform installation process.
Note:

This procedure is for message-based synchronisation client projects.

For message-based applications, you need to remove the references to the Ultralite DLLs, and add references to the System.Data.SQLite.dll (for Windows and Windows Mobile) and SQLite.Interop.065.DLL (for Windows Mobile only).

  1. From the Visual Studio main menu select File > New > Project.
  2. In the Visual C# project type, select Visual C# > SybaseMobileApplication and include the Name, Location, and Solution name, then click OK.
    vs_new_project
  3. Enter:
    • Target platform – WM5, WM6, Win32, and so on.
    • Library version – .NET version 2.0, 3.5, and so on.
    • Language – the language used in the resource DLLs, to be included in the generated project.

    Based on your selections, different sets of DLLs are included in the project. The project contains all assemblies and runtime support DLLs required to access the Object API.

  4. (Optional) Select Include SUP Windows Mobile Controls to reference the dependent Sybase Windows Mobile Component Library Assemblies in the generated project. This allows you to use Sybase Unwired Platform UI controls.
  5. Click OK to generate the Visual Studio Project with the dependent Sybase Unwired Platform .NET assemblies.
  6. Remove references to the iAnywhere.Data.UltraLite.dll and iAnywhere.Data.UltraLite.resources.dll files.
  7. Add references to the System.Data.SQLite.dll.
    1. In the project, right-click the References folder and select Add Reference.
    2. Browse to the <UnwiredPlatform_InstallDir>\UnwiredPlatform \Servers\UnwiredServer\ClientAPI\SQLite\CompactFramework \System.Data.SQLite.dll file, select it, and click OK.
  8. Add the following librariers as items in the Visual Studio project and set "Build Action" to "Content" and "Copy to Output Directory" to Copy always.
    • SQLite.Interop.065.DLL – from <UnwiredPlatform_InstallDir>\UnwiredPlatform\Servers\UnwiredServer\ClientAPI\SQLite\CompactFramework.
    vs_dll.files_copyalways