Deploying VS2003 app(converted to Vs2005) in CE5.0 Device

My application was developed in vs2003 C# CF1.0 and Sql Server Ce with SQL Server 2000 for synchronization for PPC2003 devices. I am trying to convert that project to VS2005 sothat I can deploy it on Windows Ce5.0 device. The conversion wizard didn't successfully convert the project, it kept throwing the error Compact Framework 1.0 is not installed on the computer even though I had it and I can compile the project in Vs2003.

    So I installed VS2005 on other computer and successfully converted the project. But still it didn't give me the option to connect to Ce5.0 device. So I created new Vs2005 project for Ce5.0 devices and copied my existing sources. Now I can compile and deploy the application except that on the device side it throws the error 'it requires newer version of compact framework'. I read that it is because of Ce5.0 security model, so I installed CF2.0 manually by copying the CAB file. But still it throws the same error.

    In my device I ahve Ce5.0 OS, but I don't have Mobile 5.0 (PPC). Does VS2005 projects work only on WM50 or should work on Ce5.0 device as well. If so, can you please tell me how I can come across this error and successfully deploy the application.

Thanks in advance.


Answer this question

Deploying VS2003 app(converted to Vs2005) in CE5.0 Device

  • Andy2222

    I see...

    First case is because assembly from SR CAB was not found. If you indeed have SR CAB for V2 installed, it's probably installed incorrectly or damaged. < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

    Consider removing it (called “.NET CF 2.0 ENU-String Resource” in “Remove programs”) and installing it again. If not helpful, I would suggest hard resetting the device, VS should redeploy everything and hopefully it will work.

     

    Second issue means NETCF V2 is not installed on device. You should try installing NETCF V2 CAB manually, that would be NETCFv2.wce5.armv4i.cab.

    If you on Beta 2, CAB might refuse to install right away because of CPU ID issue (please see this: http://blogs.msdn.com/netcfteam/archive/2005/10/11/479793.aspx).

    You should upgrade to RTM to fix that. If you’re using RTM and installation has failed for some reason, please provide a log file.



  • Jenna Lee

    ok, I am trying to run the app on 2 different devices, one os PPC2003 and other is WinCe5.0 device. When I run it on on PPC2003, I get "Error message cannot be displayed because resource assembly cannot be found" error.  But, by debugging, I was able to get the actual exception message which is Argument Exception in Marshal.PtrToStructure method call. This device's configuration is, HP iPaq, Windows Mobile 2003 Second Edition. OS Version  4.21.1088, Build 14132. Processor type is Samsung S3C2410.

        The other device I am working on is Windows Ce5.0 device. When I try to run the app on this device, I get "this application requires newer version of .NET CF than the one installed on the device".  Even if I create a device project for Ce5.0 device with just the default form and run it on the device, I get the same error. This device's configuration is,  Windows Ce5.00, Build 1400. Processor type is Intel, ARM 920T-PXA27x.

    Thank you.


  • Andy Boura

    SR CAB was installed already for .NET CF2. But I manually copied SR CAB for english from .NET CF2.0 as well as CF1.0 and ran the application again. But still I cannot see what is the error message, it agan says 'resource assembly cannot be found" error only. I can find my application error when I debug the code, but still I am wondering why is it showing this assembly error.

  • manny336

    I understand that it is not the actual error message. As I mentioned in my reply, I have installed SR CAB for .NET CF2.0 and it is showing in Remove Programs as well. Now, by debugging the app, I found what is the error message. It throws argument exception in Marshal.PrtToStructure (P/Invoke) method call. I have created separate thread and pasted the code. It would be great if you can take a look at that. Thanks again.

  • Dominic99Rus

    Yes, new project from same sources is the most reliable way to do it.

    As to the message, make sure you indeed have NETCF V2 installed. To do so click on \windows\cgacutil.exe, it would show installed version(s). Should be 2.0.xxxx.xx. Also check "Remove programs" for NETCF V2. Since you're using SQL Mobile, make sure it's also installed.

    Here's how to connect to CE device without AS:

    http://blogs.msdn.com/vsdteam/archive/2005/01/05/347332.aspx< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />



  • Sibusiso

    Thank you very much for your reply. I checked the version. In remove programs also it shows .NET CF2.0 as installed and Sql Mobile is also installed.

    When I debug or run the app using VS2003, it runs perfect on PPC2003 device. But when I do the same with VS2005 on the same device, it gives the following error message. "An error message cannot be displayed because an optional resource assembly containning it cannot be found". Do you have any idea about this and how I can get rid of this Thanks in advance again.

  • Espen Eriksmoen L&amp;#216;ke

    This is not an error, it's a message to inform you assembly with messages can not be found. Chances are: you don't really have SR CAB installed. Perhaps, you did not click on SR CABs Also, SR CABs are different for V1 and V2, make sure you have SR CAB for correct version.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />



  • mohammmad

    There is no security model on CE 5.0 devices; it’s only on WM 5.0. Yes, CE 5.0 is fully supported by VS 2005, NETCF V2 projects only. Please provide your device make, model, CPU type, OS version/build number, CAB file name you're trying to install, exact message installer shows and install log file (Microsoft .NET CF 2.0.LOG.TXT - in device root folder). It's also not clear to me how you managed to get runtime exception if you can't install NETCF V2 on your device < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />



  • Vishwa

    That means there's an exception in your application. You should install SR CAB to get error message and fix your code accordingly so it would be V2 compatible.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />



  • Stephenn1

    My main goal is to run the application on Windows Ce5.0 device. In that device, I cannot oversome the error, 'this device requires newer version of CF'. As I mentioned in my 1st post, I understand this is because of the device's security model, (even though tI am not sure why this should happen in RTM version of VS2005 which is what we are running as it should have a valid certificate now), I manually copied the CAB file and installed it. But still I cannot pass this message.

        My question again is, I am trying to run the app on Windows Ce5.0 device, not Windows Mobile5.0. The VS2005 apps should technically work on this device, right Thanks.

  • Deploying VS2003 app(converted to Vs2005) in CE5.0 Device