none
TypeloadException error

    Question

  • Hi  ,

    after i rebuild my new image of windows ce6, now i get TypeLoadException error all the time in my dotnet app!!

    ive tried everything and nothing works :( !

    like : 

    Recreate project of dotnet program,

    rebuild image of windows ,

    remove dotnet v2 from cebase image,

    remove sqlcompact from image  .

    even i downloaded sample app from codeproject and that didnt work to..

    all dotnet program gives me this on device :

    Error

    An unexpected error has occurred in SmartDeviceproject.exe.

    and when i click details :

    Error

    SmartDeviceproject.exe

    TypeLoadException

    at

    system.windows.forms.control..ctor(WNT wntm Uint32 dwStyle)

    at

    System.Windows.Forms.ContainerControl..ctor(WNT wnt,Uint32 dwStyle)

    at SmartDeviceproject.exe.Form1..ctor()

    at SmartDeviceproject.exe.Program.Main()

    and this error happen all the time o.O

    thanks


    Ahad Porkar Rezaeye (MCPD,MCITP) Software Engineer ahad.porkar@hotmail.com www.artasoft.net

    Monday, February 27, 2012 5:18 PM

Answers

  • I see that your message is old, but the first step is always:

    * build a simple application from scratch and put a button on a form and try that. Does it fail?

    * if so, the likely cause is that the framework itself is not properly installed on the device, either because updating the OS damaged it in some way or because you reverted to a clean registry that doesn't reference the framework correctly.

    * if it works, proceed to add some form of container control (whatever is used in your actual code) and test.

    Paul T.

    • Marked as answer by Ahad porkar Friday, March 16, 2012 6:11 PM
    Thursday, March 15, 2012 4:42 PM

All replies

  • I see that your message is old, but the first step is always:

    * build a simple application from scratch and put a button on a form and try that. Does it fail?

    * if so, the likely cause is that the framework itself is not properly installed on the device, either because updating the OS damaged it in some way or because you reverted to a clean registry that doesn't reference the framework correctly.

    * if it works, proceed to add some form of container control (whatever is used in your actual code) and test.

    Paul T.

    • Marked as answer by Ahad porkar Friday, March 16, 2012 6:11 PM
    Thursday, March 15, 2012 4:42 PM
  • I should have mentioned comparing ceconfig.h from before and after your rebuild. It's possible that you inadvertantly removed an OS component. Ceconfig.h should help you identify the differences.

    Paul T.

    Thursday, March 15, 2012 4:44 PM
  • Thanks for respond ,

    The problem solved just by starting new solution and making new image with exact same setting o.O


    Ahad Porkar Rezaeye (MCPD,MCITP) Software Engineer ahad.porkar@hotmail.com www.artasoft.net

    Friday, March 16, 2012 6:11 PM