Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Mobile
  4. My app works on the PC but not on the Smart Device - I'm desperate!

My app works on the PC but not on the Smart Device - I'm desperate!

Scheduled Pinned Locked Moved Mobile
csharphelpc++visual-studiotutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dewald
    wrote on last edited by
    #1

    Hi all, I am so hoping that someone can help me out here. I'm writing an application for a terminal[^]. I'm only starting to learn C# and with this terminal and all its sort of a double learning curve for me although I am experienced in C++. I've had plenty problems which I've managed to iron out one after the other but it seems that I have now reached a dead end where I simply lack the know-how to troubleshoot. When I compile my application it gives no warnings or errors. I can run it on the PC but when I copy it across to the device I get various exceptions. And what really concerns me is that I can't readily reproduce these exceptions. The three exceptions that I mostly get are InvalidProgramException, TypeLoadException and MissingMethodException. When I comment out lines of code from my application, and these can be real meaningless lines such as MessageBox.Show("1st image loaded"); I get another exception. As I said, these exceptions seem not to be predictable and I never know which one I'm going to get - a bit like a box of chocolate (sorry, bad joke:)). Anyway, I would be very appreciative if someone could give me some advice as to how to get to the bottom of this. Some background that might be of use: The device runs Windows CE 4.2 and .NET CF 1.0 I'm using Visual Studio 2005 When creating the project I've selected Visual C# -> Smart Device -> Pocket PC 2003 -> Device Application (1.0) This is because there is no option for Windows CE 4.2 (only 5.0) and I need to target the CF 1.0 When I create just a basic application with a form and some buttons etc. it does work on my device.

    S 2 Replies Last reply
    0
    • D Dewald

      Hi all, I am so hoping that someone can help me out here. I'm writing an application for a terminal[^]. I'm only starting to learn C# and with this terminal and all its sort of a double learning curve for me although I am experienced in C++. I've had plenty problems which I've managed to iron out one after the other but it seems that I have now reached a dead end where I simply lack the know-how to troubleshoot. When I compile my application it gives no warnings or errors. I can run it on the PC but when I copy it across to the device I get various exceptions. And what really concerns me is that I can't readily reproduce these exceptions. The three exceptions that I mostly get are InvalidProgramException, TypeLoadException and MissingMethodException. When I comment out lines of code from my application, and these can be real meaningless lines such as MessageBox.Show("1st image loaded"); I get another exception. As I said, these exceptions seem not to be predictable and I never know which one I'm going to get - a bit like a box of chocolate (sorry, bad joke:)). Anyway, I would be very appreciative if someone could give me some advice as to how to get to the bottom of this. Some background that might be of use: The device runs Windows CE 4.2 and .NET CF 1.0 I'm using Visual Studio 2005 When creating the project I've selected Visual C# -> Smart Device -> Pocket PC 2003 -> Device Application (1.0) This is because there is no option for Windows CE 4.2 (only 5.0) and I need to target the CF 1.0 When I create just a basic application with a form and some buttons etc. it does work on my device.

      S Offline
      S Offline
      Sujith C Jose
      wrote on last edited by
      #2

      Hi Dewald, I think this is because the .net framework in vs2005 you r using is 2.0. Can you try this. File->New Project->Visual C#->Smart devices->Smart Phone2003->Device Application. I know you want pocket pc 2003, we can do to it .This is to make sure that vs2005 will take .net framework 1.0. From Project menu select "Change Target Platform" and select pocket pc 2003 and accept the changes.This will change the target platform to pocket pc but the .net framework will remain the same (ie 1.0). Now u try ur code . If the problem is what i think it will work, other wise sorry man.

      Sujith

      1 Reply Last reply
      0
      • D Dewald

        Hi all, I am so hoping that someone can help me out here. I'm writing an application for a terminal[^]. I'm only starting to learn C# and with this terminal and all its sort of a double learning curve for me although I am experienced in C++. I've had plenty problems which I've managed to iron out one after the other but it seems that I have now reached a dead end where I simply lack the know-how to troubleshoot. When I compile my application it gives no warnings or errors. I can run it on the PC but when I copy it across to the device I get various exceptions. And what really concerns me is that I can't readily reproduce these exceptions. The three exceptions that I mostly get are InvalidProgramException, TypeLoadException and MissingMethodException. When I comment out lines of code from my application, and these can be real meaningless lines such as MessageBox.Show("1st image loaded"); I get another exception. As I said, these exceptions seem not to be predictable and I never know which one I'm going to get - a bit like a box of chocolate (sorry, bad joke:)). Anyway, I would be very appreciative if someone could give me some advice as to how to get to the bottom of this. Some background that might be of use: The device runs Windows CE 4.2 and .NET CF 1.0 I'm using Visual Studio 2005 When creating the project I've selected Visual C# -> Smart Device -> Pocket PC 2003 -> Device Application (1.0) This is because there is no option for Windows CE 4.2 (only 5.0) and I need to target the CF 1.0 When I create just a basic application with a form and some buttons etc. it does work on my device.

        S Offline
        S Offline
        Sujith C Jose
        wrote on last edited by
        #3

        Dewald wrote:

        I can run it on the PC but when I copy it across to the device I get various exceptions

        what do you mean by this? running in emulator. How r you copying files to the device? vs2005 can automatically deploy the solution and all the required dlls to the device, and later you can develop a cab project of the solution and then install it on the device if needed. you can run the program with out manually copying.Check if you are following these steps. 1.From Tools menu select "Connect to Device",select "Pocket pc 2003 device" and press connect buttom. If connection succeeds, ok. 2.Build or Rebuld the solution 3.Then run the project, ensure you have selected "Pocket pc 2003 device" in the combo box for target device. It may take some time for the first time but after that you can run the project again with less time.By doing this vs2005 will deploy the solution to the device and all the supporting files. regards

        Sujith

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups