Windows CE 6.0 and CF3.5

W

Werner

I have build a CE6 image and included the CF2.0 and CF3.5 component to my
image. CF3.5 was released as a QFE of month January 2008. Before I had only
CF2.0 in my CE6 image.
I have a few smart device C# projects that run fine on my old CE6 image with
CF2.0. These apps were targeted against 2.0.
If I now run my old apps on the newly build device with CF3.5 added to the
image, they won't run anymore. The error message is
"Error. An unexpected error has occured in MyApp.exe...
MissingMethodException. This application requires a newer version of the
Microsoft .NET Compact Framework than the version installed on this device".
I just took the old binary that ran fine on my old CE6 image with CF2.0.

If I convert with VS2008 my old smart device project from VS2005, deploy it
and try to run it, I get the following error
".NET CF initialization error. The application failed to load required
components. If the .NET Compact Framework is installed on a storage card,
please ensure that this card is in place and launch the application again. If
this fails, a re-installation of the .NET Compact Framework is recommended.
Support info :-214748643 (80000005)"

cgacutil.exe returns "Microsoft .NET Compact Framework [3.5.7283.0,
2.0.7045.0]
All CF2.0 and CF3.5 binaries are in "\Windows" folder on the CE6 device.
My apps do use P/Invoke, but all referred dlls are present (they were not
changed)

What am I doing wrong?
I have not installed anything special on my development PC. VS2008 is
installed and Compact Framework 3.5 was installed with it.

Please advice
Werner
 
W

Werner

I could make the programs run again if I manually with a text editor changed
the following line in my csproj file
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> to
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
and recompile my programs. After that they run again.

But I thought when you have both CF2.0 and CF3.5 installed on your CE6
device, both v2.0 and V3.5 targeted programs should be able to run side by
side, no?

Can somebody confrim/deny this?

Werner
 
P

Paul G. Tobey [eMVP]

I don't know what the intended operation is, but you don't *need* to have
both 2.0 and 3.5. Just include 3.5 and both your 2.0 and 3.5 programs
should run fine.

Paul T.
 
W

Werner

I intend to create (upgrade) a Windows CE 6.0 image that can run both my old
managed CF2.0 programs and newly created managed CF3.5 programs. So I thought
I had to add both CF2.0 and CF3.5 Windows CE 6.0 component to my image.
Platform Builder allows to add both side by side in your image.
As you suggested, I rebuild the CE6.0 image with *only* CF3.5 added and both
managed CF2.0 and CF3.5 programs work now. If you add both CF2.0 and CF3.5
components to your Windows CE 6.0 image, your older managed CF2.0 programs
won't work always (some of them do, but most of them not). Unless you rebuild
them as a CF3.5 targeted program.

Thanks for the help
Werner
 
P

Paul G. Tobey [eMVP]

If you can identify what the determining factor is, what causes one 2.0
program to work and another not, that would be something very useful for the
..NET CF team to know (and fix!)

Paul T.
 
W

Werner

I don't know what causes the managed (C#) CF2.0 programs to fail. I tried to
strip down my programs, but at some point they failed to work for missing
functionality (that I removed). I was not able to detect the cause.
But if it is enough to include *only* the CF3.5 component in your Windows CE
image, what is the point to still having the CF2.0 in there? Or did MS
intended to let both the CF2.0 and CF3.5 work together side by side? Example.
Install CF3.5 as an upgrade to a device which has CF2.0 on it?
I can provide the source code of 2 programs that don't work to MS, but I
don't feel like starting another support incident again taking into account
the loooong and annoying process of getting something fixed. I have currently
3 CE6.0 related support incidents pending, all 3 are confirmed as bugs, but
only 1 will be fixed for me in the short term. The others are postponed to
some undetermined future release.
As I am in control of the CE6.0 image, I can remove quite easily the CF2.0
component and add the CF3.5 component. This appears to work.

Werner
 
P

Paul G. Tobey [eMVP]

There's no such thing as 100% backward compatibility. If you have a device
and if that device is in-use in the field on many, many devices, it's quite
likely, particularly if you are targeting a market which is very
conservative about changes, that the customers would be angry if you changed
unexpectedly to 3.5.

Also, you might notice that, if you try to put SQL Mobile and the .NET CF
libraries for accessing it in your CE5 OS, you'll get .NET CF 2.0 whether
you want it or not. I've fixed that for myself, but it seems clear that MS
has not tested .NET CF 3.5 with SQL Mobile and those 2.0-based database
libraries.

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top