Smart Device application problem

Last post 11-06-2007 16:17 by ctacke. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-23-2007 18:26

    Smart Device application problem

    Hi,
    I have read article of hosting ActiveX control. It is really good. I will be glad if help me a little to figure out of an error.

    Basic information:

    1.Smart device application(Pocket PC 2003 SE ) Emulator 2.0 and Target device.
    2.Visual studio 2005 (released version)
    3..Net Compact Framework 2.0
    4..Net Framework 2.0
    5.c#, ActiveX control

    I have an ActiveX control for video playback which is implemented on Desktop application, is working fine.

    My project is now to incorporate that ActiveX control to the device and playing video file. According to the following site i followed every steps.
    http://msdn2.microsoft.com/en-us/library/aa446515.aspx. Title is "Hosting ActiveX Controls in the .NET Compact Framework 2.0" . I ran the following command line, AxImp.exe C:\TestActiveX\MediaDBPlayback.dll /source, it produces three files:

    * MEDIADBPLAYBACKLib.dll
    * AxMEDIADBPLAYBACKLib.cs
    * AxMEDIADBPLAYBACKLib.dll

    I added AxMEDIADBPLAYBACKLib.cs file under project and also added reference MEDIADBPLAYBACKLib.dll except AxMEDIADBPLAYBACKLib.dll because it was mentioned on the articles.

    To resolve following errors
    1. "The type or namespace name 'AxHost' does not exist in the namespace 'System.Windows.Forms'"
    2.The type or namespace name 'DesignerSerializationVisibility' does not exist in the namespace 'System.ComponentModel' etc.

    i added reference some Dlls such as "System.dll", "System.Drawing.dll" "System.Windows.Forms.dll" under "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\" path.

    It was necessary to create Strong Name key i also did. After build my solution according to my class name i got "MyMediaControl.dll" dll file. I also registered this dll file as "regasm MyMediaControl.dll /codebase". But it does not install to GAC.

    After doing everything i have seen my control to the Toolbox. I Dragged and Dropped to my Emulator Window it showed. But when i build my solution i am facing an error.


    The type 'System.Windows.Forms.AxHost' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

    i tried to solve this error with the help of internet but i failed to figure out the exact reason.

    If you tell me reason it would really help. I will be waiting for you valuable reply.

    It is too essential because of my delivery of product.

    Regards
    Morshed
  • 05-25-2007 4:36 In reply to

    Re: Smart Device application problem

    I suggest you try doing what it says:
    In Solution Explorer locate the project named in the build error.
    Right click References - select Add
    In the NET tab select System.Windows.Forms

    Hope this helps
  • 05-25-2007 8:06 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,922

    Re: Smart Device application problem

    b77a5c561934e089 is the public key token for the desktop .NET Framework 1.1 so your assembly is incorrectly using a desktop reference.
  • 05-29-2007 11:37 In reply to

    Re: Smart Device application problem

    Thanks ctacke for your valuable Reply. I added the correct desktop reference and now no compile time error. But i am getting 2 warnings.

    Warning 1 Could not load file or assembly 'MEDIADBPLAYBACKLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6deb6bb1f0cb1648' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Warning 2 Reference to type 'System.Runtime.Serialization.ISerializable' claims it is defined in 'c:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll', but it could not be found c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll

    Is it essential to resolve the warnings? If so how can i solve those warnings?

    Now if i don't care about warnings and run my project. At run time i am getting an exception.
    "An unhandled exception of type 'System.MissingMethodException' occurred in Unknown Module".

    How can i solve this error? Please give me any hints or suggestions that i can identify the problem.

    Regards
    Morshed





  • 11-06-2007 6:45 In reply to

    Re: Smart Device application problem

    hi friends I have installed software named Geographic information system.. After compliting installing it shows as 2.0.50727 error, how can i solve this problem...
  • 11-06-2007 16:17 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,922

    Re: Smart Device application problem

    You cannot run or use desktop assemblies in CF applications. There is no way to make it work.
Page 1 of 1 (6 items)