5
votes

I am busy developing a .Net compact Framework 3.5 application for Windows CE 6.0 and am really struggling to figure out how to get a development environment up and running to debug my code.

Creating the Visual Studio project and writing the code is not the problem. But now to press F5 and run this puppy in an actual Win CE 6.0 Emulator (or similar?!) is where I am getting stuck and I have Googled this subject to death and just not finding any good tutorials/documents/help on how to get it from 'n Visual Studio project to debugging the project (or even running a simple hello world) in Win CE 6.0.

So my question is this. Can anybody please point me in the direction of a good tutorial (or provide one your selves) to get a Win CE 6.0 dev environment up and running.

Perhaps I am missing something and it just is not possible to connect and debugging to Win CE? If that is the case, how do you recommend debugging Compact Framework code in general?

The closest that I have gotten to a CE tutorial is this: http://tech-stuff-home.blogspot.com/2011/03/building-workspace-for-device-emulator.html And I have done all the steps in this tutorial to get Win CE build running, but the problem is that this does not connect Compact Framework development to the device created above. Edit: Even though I get CE running in a device emulator (using tutorial above), I cannot get this as a deploy option in the Device Emulator Manager when deploying a CF project.

2
what version of VS are you using?Filip

2 Answers

4
votes

You should make a connection using CoreCon. Th3e steps involved are

  • Copy all of the CoreCon bits from your dev PC to the device (emulator is just a device)

enter image description here

  • Verify/note the IP address of the device

enter image description here

  • Modify the connection in your PC to use that address for connecting

enter image description here

  • Run conmanclient2.exe (on the device)
  • Run cmaccept.exe (on the device)
  • Verify the target device is set to the device you conmfigured

enter image description here

  • Test the connection from Studio

enter image description here

  • Debug
0
votes

It is not completely clear for me, but I understand you have no problems running in an emulator but you can't run nor debug the application on an actual device?

I cannot say what is actually causing it, but things I always check:

  • Device is not connected (can you see it in My Computer?)

  • Make sure you select the device option instead of the emulator (in VS2008 in the toolbar, you should have the 'Device' panel visible. In this panel you can switch devices and there you should have 'Windows Mobile 6 ... Device' selected. Try connecting from there without actually running the app.

  • Check the Configuration Manager, set it to Debug (Release sometimes gives problems)
  • In the Project options, check the Devices tab. Select the appropriate Target for and optionally check 'Deploy latest version of .NET' to be sure all the files are there.
  • Depending on your system OS, it might be needed to install ActiveSync (XP) or Windows Mobile Device Center (Vista and above). When it is installed, connect the device and let Windows install all the drivers needed. Then reboot and try connecting again. In both cases connecting the device should invoke a response from Windows for connecting to your device.
  • Try using the Visual Studio Remote Tools, for example the Remote File Viewer. Does it work?

Do you get any kind of error message when trying to connect? Unfortunately I never found a good tutorial on this subject. I learned all this the hard way when I started CF development a couple of years ago.