Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / March 2008

Tip: Looking for answers? Try searching our database.

Windows CE 6.0 and CF3.5

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Werner - 21 Mar 2008 00:29 GMT
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
Werner - 21 Mar 2008 16:22 GMT
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
Paul G. Tobey [eMVP] - 21 Mar 2008 17:02 GMT
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.

>I could make the programs run again if I manually with a text editor
>changed
[quoted text clipped - 10 lines]
>
> Werner
Werner - 24 Mar 2008 21:25 GMT
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
Paul G. Tobey [eMVP] - 24 Mar 2008 21:44 GMT
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.

>I intend to create (upgrade) a Windows CE 6.0 image that can run both my
>old
[quoted text clipped - 12 lines]
> Thanks for the help
> Werner
Werner - 25 Mar 2008 09:19 GMT
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

> 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
[quoted text clipped - 18 lines]
> > Thanks for the help
> > Werner
Paul G. Tobey [eMVP] - 25 Mar 2008 16:19 GMT
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.

>I don't know what causes the managed (C#) CF2.0 programs to fail. I tried
>to
[quoted text clipped - 45 lines]
>> > Thanks for the help
>> > Werner

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.