Creating the SampleApp Visual Studio Project From a Template

Create a project using a template which allows you to customize the generated C# API Object code from the SUP101 mobile application project.

Prerequisites
The Sybase Unwired Platform Visual Studio templates are installed in Visual Studio by the Sybase Unwired Platform installation process when you select the Windows Mobile UI Controls feature.
  1. From the Visual Studio main menu select File > New > Project.
  2. In the Visual C# project type, select SybaseMobileApplication, in Name, enter SampleApp, then click OK.
    vs_new_project
  3. In the next screen, select:
    • Target platform – Windows Mobile 6.0 Professional SDK.
    • Library version – .NET Compact Framework 2.0.
    • Language – the language used in the resource DLLs, to be included in the generated project.
    • Include SUP Windows Mobile Controls – to reference the dependent Sybase Windows Mobile Component Library Assemblies in the generated project. This allows you to use the Sybase Unwired platform UI controls.

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

  4. Click OK to generate the Visual Studio Project with the dependent Sybase Unwired Platform .NET assemblies.
  5. In the SampleApp References folder, remove the references to iAnywhere.Data.Ultralite and iAnywhere.Data.UltraLite.resources. These references are not necessary for a message-based application.
  6. In the SampleApp project, create a folder called GeneratedCode.
  7. Open File Explorer, go to the workspace\SUP101\src\SUP101 folder in the location you specified for the generated code, for example, C:\Documents and Settings\sybaseuser\workspace\SUP101\src\SUP101, select all the .cs files and the intrnl folder, and drag and drop them to the GeneratedCode folder in the SampleApp project in Visual Studio.
  8. In Visual Studio, add these references to the SampleApp project:
    1. Right-click References and select Add Reference.
    2. Click the Browse tab and from SampleApp\clientAPI\dotnet\ce\v2.0, select sup-client.dll, and click OK.
    3. Right-click References and select Add Reference.
    4. Click the Browse tab and from <UnwiredPlatform_InstallDir>\UnwiredPlatform\Servers\UnwiredServer\ClientAPI\SQLite\CompactFramework, select System.Data.SQLite.dll and click OK.
  9. Right-click the SampleApp project and select Add > Existing Item. From <UnwiredPlatform_InstallDir>\UnwiredPlatform\Servers \UnwiredServer\ClientAPI\SQLite\CompactFramework, select SQLite.Interop.065.DLL, then select Add > Add As Link. vs_add_interop.065_as_link
  10. Select the SQLite.Interop.065.DLL file and, in the Properties view, change the Copy to Output Diretory property to Copy always. vs_dll.files_copyalways