Compact Framework 2.0 and Windows CE 4.2


R

richard.giuli

HI all,

My background is that we have CE 4.2 devices deployed in the field. We
are adding new software and I would like to write a CF 2.0 app that
uses C# and pinvoke. I got this to work by writing the C++ and C# apps
in MSVC 2005, targetting the correct processor and then deploying by
hand. The problem is that I can't debug it from MSVC 2005.

Our devices are already deployed, so there is no chance of getting new
ones with a more modern os. I could always revert to using MSVC 2003
and embedded tools 4.0, but it would be _very nice_ to get MSVC 2005 to
work so I can use CF 2.0 and debug.

I am looking for some clarification on this topic. From searching
online I have determined that:
1. MSVC 2005 does not support Windows CE 4.2 devices. You cannot
deploy or debug.
2. Compact Framework 2.0 _is supported on CE 4.2_. I downloaded the
cab file and wrote a sample app, and it seems to work well.
3. Only MSVC 2005 supports CF 2.0 debugging.

Anyone please correct me if any of the above points are incorrect...
thanks in advance.

Regarding CF 2.0 support, as a developer I see a big disconnect here:
You can run a CF 2.0 app on a CE 4.2 device, but you cannot debug and
deploy it from MSVC 2005. Is there any good reason why this
functionality did not make it into MSVC 2005? If Microsoft doesn't
support development of CF 2.0 apps for Windows CE 4.2, then why did
they release CF 2.0 for CE 4.2? I am confused. Are there plans to add
this support to MSVC 2005?

it would be nice to get an official answer to this question. If anyone
else out there knows how I can debug using MSVC 2005, I would greatly
appreciate the help. I was actually able to get MSVC 2005 to start
deployment by telling it the device is a pocket pc 2003 device (but it
is actually 2002). However, the cab files it deploys specify CE 5.0 as
the min version. I am currently trying to modify these cab files by
hand, install them and initiate a remote debugging session. This is
painful though and I am hoping someone out there can advise a better
solution. My last resort is to go back to MSVC 2003 and CF 1.0 if I
can't make headway here.

Thanks,
Rich
 
Ad

Advertisements

I

Ilya Tumanov [MS]

Though officially not supported, you should be able to debug and deploy
application to CE 4.2 device from VS 2005 by using CE 5 project (except if
your device uses x86 CPU).

You will need to deploy NETCF V2 SP1 CAB manually.



--
Best regards,


Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
R

richard.giuli

Thanks! I was using a pocket pc 2003 project type before. When I create
a CE 5.0 project I now have the option to deploy on a 5.0 device, and I
can now debug and deployment directly from MSVC 2005.

I also install the cab manually first. It doesn't work unless I do
this.

Thanks,
Rich
 
P

Paul G. Tobey [eMVP]

Regarding CF 2.0 support, as a developer I see a big disconnect here:
You can run a CF 2.0 app on a CE 4.2 device, but you cannot debug and
deploy it from MSVC 2005. Is there any good reason why this
functionality did not make it into MSVC 2005? If Microsoft doesn't
support development of CF 2.0 apps for Windows CE 4.2, then why did
they release CF 2.0 for CE 4.2? I am confused. Are there plans to add
this support to MSVC 2005?

This was caused by timing. VS2005 was out for a long time before MS was
convinced by developers that .NET CF 2.0 should be supported on CE4.2 (this
is the 'why' for releasing it on CE4.2, demand from developers; running apps
is supported for CE4.2). A service pack for VS2005 to truely support
deployment, debugging, targeting, etc. is a different thing than a piece of
software that only has an effect on the Windows CE end. Different people,
significantly more testing, etc.

Paul T.
 
G

Guest

Inline...
1. MSVC 2005 does not support Windows CE 4.2 devices. You cannot
deploy or debug.
Correct.

2. Compact Framework 2.0 _is supported on CE 4.2_. I downloaded the
cab file and wrote a sample app, and it seems to work well.
Correct.

3. Only MSVC 2005 supports CF 2.0 debugging.

VS05 supports CF 1.0 apps as well, but still only targeting PPC03, WM 5.0
and CE 5.0
Anyone please correct me if any of the above points are incorrect...
thanks in advance.

Regarding CF 2.0 support, as a developer I see a big disconnect here:
You can run a CF 2.0 app on a CE 4.2 device, but you cannot debug and
deploy it from MSVC 2005. Is there any good reason why this
functionality did not make it into MSVC 2005?

Adding debugging to older devices would have taken a lot of resources and
the payback probably wasn't deemed cost effective.
If Microsoft doesn't
support development of CF 2.0 apps for Windows CE 4.2, then why did
they release CF 2.0 for CE 4.2?

Because a lot of us wanted it. I'm comfortable enough to write an app and
debug it against a CE 5.0 target, then deploy it to a CE 4.2 device for
final testing, as are many other people. The community decided that at
least that level of support would be better than the flat-out "no 4.2
support" that CF 2.0 had before SP1, and MS met us half way and gave that
level of support.
I am confused. Are there plans to add
this support to MSVC 2005?

Not that I'm aware of.
it would be nice to get an official answer to this question.

Not sure about some "official" page, but I'm pretty sure I've seen members
of one team (probably but not definitely the Studio team) that 4.2 support
is not going to happen for Studio. You might search their blogs as well as
the NG archives.
If anyone
else out there knows how I can debug using MSVC 2005, I would greatly
appreciate the help. I was actually able to get MSVC 2005 to start
deployment by telling it the device is a pocket pc 2003 device (but it
is actually 2002).

That's a differenc story, if you're targeting a PPC 2002. That's CE 3.0.
However, the cab files it deploys specify CE 5.0 as
the min version. I am currently trying to modify these cab files by
hand, install them and initiate a remote debugging session. This is
painful though and I am hoping someone out there can advise a better
solution.

Debug agains CE 5.0, then test on 4.2 when it's all working under 5.0.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--
 
R

richard.giuli

Thanks. I got it working. I can see why there was a demand from
developers. There are a lot fo 4.2 devices out there.

I can now debug the C# app directly from MSVC 2005. When the C# app
calls into a C++ dll using pinvoke (built with MSVC 2005), I cannot
debug. I figure this is probably asking too much of MSVC 2005 since it
doesn't officially support 4.2. I can live with this, and if I need to
debug the C++ libraries I can use embedded tools.

Thanks,
Rich
 
Ad

Advertisements

P

Paul G. Tobey [eMVP]

You've never been able to step into unmanaged code from managed code in
Windows CE on any version of the OS or with any version of the framework.
It's a requested feature from the team, but most people don't need it.

Paul T.
 
N

nicholas.boorman

I'm in the same situation as Rich. When I try to Connect or Deploy to
my CE 4.2 device I get the following error:

"Error 1 The device security configuration disallowed the connection.
Ensure that you have the appropriate certificates on your device for
development. Review your SDK documentation for proper security settings
for connecting to this device. Device Connectivity Component"

I have tried installing the SdkCerts.cab file from the VS2005 directory
structure but get the "Not a valid CAB file" error. I think this is
because it's expecting a 5.0 device. Any ideas?

Thanks,
Nick
 
R

richard.giuli

Nick's problem was local only to his machine. I tested with his device
and it works on another machine.

The only difference between our configurations is that Nick previously
had ActiveSync 3.8 installed. He uninstalled that and then installed
ActiveSync 4.2. He had some trouble getting 4.2 to work afterwards
(neither MSVC 2003 or 2005 would deploy), and followed the instructions
in this link:

http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ/ActiveSyncUninstalled

Now MSVC 2003 deploys but not 2005. Any ideas? It seems ActiveSync is
very volatile when you upgrade to a new version.
 
Ad

Advertisements

R

richard.giuli

Now it works... Nick had tested rebooting and unplugging the device
many times. When we switched to a new machine, it worked. Then when
Nick went back to his old machine and plugged it in, it started working
again. Why switching to a new machine fixed things is a mystery.
Everythng works now. Thanks everyone for the help.
 

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