Using VS2005 to build/debug C# for 4.x .NET devices

T

thelaery

Hi,

I've just got VS2005 so I can compile for Windows Mobile 5.0 now.
But now I can also start writing C# smartdevice applications but only
ppc2003 and Windows Mobile 5.0 are mentioned.
How to create applications in C# VS2005 for devices still running CE
4.1 and CE 4.2.
I've tried to to deploy to one but the CF cab send to the device was
the WM5.0 version.

I've got a book .Net compact framework programming in C# from Paul Yau
and David Durant but that one is based on VS2003 for creating projects.

Another question: currently I have one common source for 3 differrent
project files VC 6.0, eVC3.0 and eVC4.0. Will this trick still work
with VS2005 C# sources? (so 2 different project: a smartdevice and a pc
one)

Any help is appreciated.

Regards
Laery
 
M

Marc Ambrosius

I've just got VS2005 so I can compile for Windows Mobile 5.0 now.
But now I can also start writing C# smartdevice applications but only
ppc2003 and Windows Mobile 5.0 are mentioned.
How to create applications in C# VS2005 for devices still running CE
4.1 and CE 4.2.
I've tried to to deploy to one but the CF cab send to the device was
the WM5.0 version.
..NET CF works with CE 4.2 and later. So there is no way to use C# with CE
4.1. To develop for CE 4.2 from VS2005 you have to (download and) install CF
2.0 SP1 on your CE 4.2 device. Create a CE 5.0 project in VS2005, change the
project settings to prevent Visual Studio from deploying different versions
of .NET CF. Now you can develop and debug (there are known problems with X86
devices).
Another question: currently I have one common source for 3 differrent
project files VC 6.0, eVC3.0 and eVC4.0. Will this trick still work
with VS2005 C# sources? (so 2 different project: a smartdevice and a pc
one)
This will work. You can even run applications withour recompiling.

Marc
 
T

thelaery

hi,

Thanks for the response Marc.
I've downloaded the 37MB CF2 sp1 and installed it.
It has send something to the hhc (ce 4.2 armv4i).
Created a new project for WM5.0. disabled the deploy of CF components.
Compiled/Deployed the application but it will not run, not even an
error.
On ppc2003/WM5.0 it works.

More then half the devices in the field are running CE4.x (for most an
firmwareupgrade to 4.2 is possible).
What can I do?

Regards
Laery



Marc Ambrosius schreef:
 
M

Marc Ambrosius

It reports
Microsoft (R) .NET Compact
Framework [1.0.3111.00]
as version.
Obviously .NET CF 2.0 has not been installed on your device successfully.
Try to deploy the file manually
(...\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab)
and run it on the device. Afterwards CGACUTIL should report something like
Microsoft (R) .NET Compact Framework [2.0.6129.0, 1.0...].

Marc
 
T

thelaery

Hi,

I've copied the
C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab
to the hhc
but when I double click it, it complains
"No .CAB files to install"
"Please specify a .cab file or double tab a .cab file to install the
application"
The file is 6.45MB.

Regards
Laery
Marc Ambrosius schreef:
It reports
Microsoft (R) .NET Compact
Framework [1.0.3111.00]
as version.
Obviously .NET CF 2.0 has not been installed on your device successfully.
Try to deploy the file manually
(...\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab)
and run it on the device. Afterwards CGACUTIL should report something like
Microsoft (R) .NET Compact Framework [2.0.6129.0, 1.0...].

Marc
 
G

Guest

Your device has a bug in the wceload registry entry. Copy the CAB file to
the device root (or any path with no space in the name) and try again.


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


Hi,

I've copied the
C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab
to the hhc
but when I double click it, it complains
"No .CAB files to install"
"Please specify a .cab file or double tab a .cab file to install the
application"
The file is 6.45MB.

Regards
Laery
Marc Ambrosius schreef:
It reports
Microsoft (R) .NET Compact
Framework [1.0.3111.00]
as version.
Obviously .NET CF 2.0 has not been installed on your device successfully.
Try to deploy the file manually
(...\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab)
and run it on the device. Afterwards CGACUTIL should report something
like
Microsoft (R) .NET Compact Framework [2.0.6129.0, 1.0...].

Marc
 
T

thelaery

Hi,

Thanks for all the help.

Placing it on the \ (root) did it.
Now it reports
Microsoft (R) .NET Compact Framework
[2.06129.0, 1.03111.0]

The application starts now :)

All that is remaining now is to know how to detect
on which device the application is running and change screen
layout.
(some devices have SIP, other don't, some are 4.2 other are ppc2003 or
WM5.0)

Regards
Laery
Your device has a bug in the wceload registry entry. Copy the CAB file to
the device root (or any path with no space in the name) and try again.


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


Hi,

I've copied the
C:\Program
Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab
to the hhc
but when I double click it, it complains
"No .CAB files to install"
"Please specify a .cab file or double tab a .cab file to install the
application"
The file is 6.45MB.

Regards
Laery
Marc Ambrosius schreef:
It reports
Microsoft (R) .NET Compact
Framework [1.0.3111.00]
as version.
Obviously .NET CF 2.0 has not been installed on your device successfully.
Try to deploy the file manually
(...\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\wce400\armv4\NETCFv2.wce4.ARMV4.cab)
and run it on the device. Afterwards CGACUTIL should report something
like
Microsoft (R) .NET Compact Framework [2.0.6129.0, 1.0...].

Marc
 

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