views:

190

answers:

1

Hello all Windows Mobile Experts! I have really drowned in the world of developing for the Windows Mobile, all the different versions and frameworks are extremely confusing. But this is my scenario:

I need to develop an app which is to be distributed outside of Marketplace, my company will use it as a showcase during a single event. It is a fairly simple app containing a slideshow of images and some text.

I started of by creating an app for Mobile 6 using CF 3.5. When I packaged the app as a CAB and tried to deploy it to our brand new HD2, it started to scream about not having the right framework version. Fine I thought, I'll just bundle CF 3.5 inside my application CAB. Apparently my the framework is really large (>60MB), which makes it impossible to download it over the air without using a Wifi connection.

Once again I thought fine, I'll just use a previous version of the framework which should be smaller. I was wrong again, CF 2.0 is also really huge (>40MB)! In addition to this, the images I added through the resource manager in my project did not work. Every time I ran my project it threw a couple of these:

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

My ranting boils down to this:

  • Is there anyway I can create a simple app without bundling the CF into it? (In other words, I need to keep the CAB-file size down.)
  • If no, how do you add an image to a Mobile 6 CF 2.0 project without using the resource manager?

Is it always this painful to develop for the Windows Mobile, or am I the issue here?

Help me out here guys/gals! And if your are located close to Stockholm, Sweden a really tasty coffee is yours!!

Thanks in advance and best regards.

+1  A: 

First, you're way off on those frameworks, you have to be looking at desktop frameworks. The CF is about 3.5 MB for version 3.5, about 3 for version 2.0.

Bundling the CF with your app is possible, though somewhat painful as you can't easily put a CAB inside of a CAB and have it install. You can always just put all of the CF binaries themselves in your CAB and deploy them manually to the \Windows folder. I've done that and it works fine (the assemblies just don't get GACed).

As far as adding an image to the application, this has been doable since pre-1.0. I'm not sure about using the resource manager for it, becasue it's very rare that I use it. Just add the file directly to the project, mark it as an embedded resource and pull it using Assembly.GetCurrentAssembly().GetManifestResourceStream("my.image.bmp").

ctacke
Apparently all I needed was the mscorlib.dll, I bundled this in the install CAB and everything works great! App size is now <1MB !Thanks a lot guys!
ABeanSits
I just hope that skipping the GAC-registration won't cause any problems. And ctacke, you are correct I was totally amiss when talking about the CF sizes. Sorry about that.
ABeanSits