Search code examples
c#wcfvisual-studiowindows-mobilecab

Creating cab file for Windows Mobile Occasionally Connected Application


I have a windows mobile application that utilizes the Microsoft Sync Framework. The WCF service is hosted on my local IIS. It tests great while docked and connected to the internet. But if I disconnect the internet to try and make changes to the local db while it is offline it loses connection to the app. So I just want to build a cab and install it on the device.

The problem is I don't know what I am doing and do not know what to include and what not to. I tried twice and both times it failed saying it cannot find the SQL CE db (ElectricReading.sdf).

I was following this tutorial: http://www.mobilepractices.com/2008/02/how-to-create-windows-mobile-smart.html

But it does not seem to pick up the proper dependencies after I add ElectricBarcodeApp.exe. For example there is no dependency to my service library added.

Here is what my project looks like:

enter image description here

So what do I need to include in the cab? Any help is much appreciated. An explanation so I can learn would be awesome too. Thanks!! Let me know what other information I can provide.

EDIT: This is what my cab file looks like after I add ElectricBarcodeApp.exe: enter image description here


Solution

  • The CAB generation project is about as non-intuitive as it gets. When you select the project, over on the right there are some little icons that are easy to miss. One of them is a "file view" of the target.

    File Editor Icon

    From there you can select additional files to include in your CAB (right click on 'Application Folder' and select 'Add File').

    Target device file system

    Simply select your local SDF to add it to the CAB.