Question

I have what seems to me an odd situation: an old .exe of the project on which I'm working runs on a handheld device. New versions don't (even the exact same code with no additions).

Even that .exe that runs on one handheld device doesn't on the other. See this for some of the gory details.

Based on this, I thought I could track down the problem.

But this PC util tells me what is missing from that (PC/build machine) environment. I need to know what is missing/wrong on the CE device.

So to "fake" that environment on my PC, which files from the handheld do I need to copy over to the PC? IOW, in which directories will an .exe on a CE device look for its necessaries?

UPDATE

Not surprisingly, the CF Whisperer (ctacke) is right. Here's what I see in the .csproj files:

The utility which does run on the newer/3190 device:

<NativePlatformName>Windows CE</NativePlatformName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>

The legacy app which does not run on the newer/3190 device:

<PlatformFamilyName>WindowsCE</PlatformFamilyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>

As I've gone back and forth between new and old versions of the source, scrapping and snapping and growling like a mama bear whose cubs have been cornered by a cougar, and finally got it to actually COMPILE and BUILD again, I don't want to upgrade the project to 3.5; I'll leave it at 2.0 and instead "downgrade" the device.

So: how can I "downgrade" the handheld device to the older CF version?

UPDATE 2

So it all (sort of) makes sense now:

One handheld device (3190) has CF 3.5 installed; thus, the utility built for CE 3.5 runs on it, whereas the app built for CE 2.0 does not.

OTOH, the other handheld device (Motorola/Symbol 3090) has CF 2.0 installed (which Windows\cgacutil.exe reports as Compact Framework version 1.0.3316.00). The app built for CE 2.0 runs on it, but the utility does not.

Arghhh!!!!!!!!!!!!!!!!!

Versioning is a canine of the feminine "persuasion," so to speak!

Why aren't operating systems and subsystems "smarter" so that they automatically detect this sort of arcana and either silently automatically fix such, or at least offer to do it for you at the click of a button? I hate spending my days squished under the chassis with dirty oil dripping in my peepers.

And so, in a twisted sort of logic (please advise me if I'm wrong), the following is the case:

Windows CE 2.0 == CF 1.0.3316.00
Windows CE 3.5 == CF ???? (the 3190 device does not have "cgacutil.exe", so I can't see what the version is)

And now: how can I remove the newer version of CF and replace it with the lesser/older version?

I do remember now that the erstwhile leader of this project (who has absquatulated) said we couldn't use 3.5 (space/memory issues) so trying to upgrade the project from targeting 2.0 to 3.5 is not an option.

Note: The 3090 (Symbol) has OS Version 05.00.1400 Windows CE Version 5.00 (Build 1400)

The 3190 (Motorola) has OS Version 6.00.000 Windows CE Version 6.00

Was it helpful?

Solution

You have some strangeness (and wrongness) in your question. Time for a little education (my >15 years of CE app dev occasionally pays off).

As far as versioning goes, Windows CE and the Compact Framework are totally unrelated. Well, there's some "X supports Y" sort of stuff, but otherwise they are unrelated.

Windows CE 2.0 dates to 1998 or 1999. At that point the CF didn't exist, it was eVB. You are not running CE 2.0. I guarantee it.

For the Compact Framework, there are 4 major versions, with some service packs for each.

  • CF 1.0 - Released with Studio 2003. Not seen much past CE 5.0 days since CF 2.0 was released while CE 5.0 was in the field.
  • CF 2.0 - Released with Studio 2005. This one is pretty common in older handhelds running CE 5.0 and CE 6.0
  • CF 3.5 - Released with Studio 2008. This one is somewhat common in newer hardware. It can be installed on a lot of older hardware.
  • CF 3.9 - Released with Studio 2012. Only works on WEC2013.

If you have a device that's reporting CF 1.0, then it can only run an app built for 1.0. Support for building for CF 1.0 apps ended with Studio 2005. You may be able to install a newer version of the CF (via CAB file) if the hardware has space and memory for it.

If you have a device reporting CF 2.0, it can run CF 1.0 or CF 2.0 apps. Again, you may be able to update to 3.5 if you have space and memory.

If you have a device reporting CF 3.5, it can run CF 2.0 apps (and probably 1.0 apps, though I doubt I've tried that in a decade).

You cannot remove any version of the CF in ROM. You can, however, install side-by-side. Installing an older version is generally not recommended nor necessary since newer versions of the CF will run apps built for older versions.

Occcasionally you may find that a device with CF 3.5 cannot run a 2.0 app. There were a couple compatibility weirdness things. In those cases you can force the CF 3.5 to actually run in 2.0 mode (without having to install the 2.0 bits) by modifying your app.config file and explicitly setting the SupportedRuntime. Take a look at this MSDN page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top