locked
System.Runtime.InteropServices.HandleRef...could not load type RRS feed

  • Question

  • Hi, i deploy my application to windows 6.1 smartphone. I receive "File or assembly name 'System.Drawing, version=2.0.0.0, Culture=neutral, PublicToken...or one of its dependencies was not found"

    Inmediatelly the dialog close and unexpected error info show me "Could not load type 'System.Runtime.InteropServices.HandleRef' from assembly mscorlib, Version=3.5.0.0

    I can see mscorlib.dll and tlb files into the application folder.

    I appreciate any help

    -gabriel

    Monday, April 25, 2011 9:34 PM

Answers

  • It seems like your application is build against desktop framework or at east has a reference to some assembly which is built against desktop framework - as you omitted the PKT I can not tell for sure.

    See if this helps to identify the issue: http://social.msdn.microsoft.com/Forums/en-SG/windowsmobiledev/thread/0406285b-c514-4dc3-84cf-2564881ab88f


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Jesse Jiang Tuesday, May 3, 2011 6:06 AM
    • Marked as answer by Jesse Jiang Wednesday, May 11, 2011 9:47 AM
    Monday, April 25, 2011 9:55 PM
  • The problem was that I was using a library project with the wrong assembies. I removed the classes of the library and put them inside the smart device project. Finally it solved the problem. Was due to a problem in libraries.

    The program failed in a call using System.Drawing MemoryStream (ms) and then Bitmap (ms). What confused me was that previously used without problems Bitmap.

    I went back to create a library project for Smart Device and everything was left running.

     

    -regards 


    -gabriel
    • Marked as answer by Jesse Jiang Tuesday, May 3, 2011 9:20 AM
    Tuesday, May 3, 2011 9:01 AM

All replies

  • It seems like your application is build against desktop framework or at east has a reference to some assembly which is built against desktop framework - as you omitted the PKT I can not tell for sure.

    See if this helps to identify the issue: http://social.msdn.microsoft.com/Forums/en-SG/windowsmobiledev/thread/0406285b-c514-4dc3-84cf-2564881ab88f


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Proposed as answer by Jesse Jiang Tuesday, May 3, 2011 6:06 AM
    • Marked as answer by Jesse Jiang Wednesday, May 11, 2011 9:47 AM
    Monday, April 25, 2011 9:55 PM
  • Hi gabriel,

     

    I think the .NET Compact Framework on your device has some issues, you need to install them on your device, and do not copy some DLL files into your application folder. I suggest you to reinstall it and try again. Please download it from here:

     

    .NET Compact Framework 3.5 Redistributable

     

    I hope my suggestions can help you to solve this problem.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Proposed as answer by Jesse Jiang Tuesday, May 3, 2011 6:06 AM
    Wednesday, April 27, 2011 7:57 AM
  • Hi,

     

    I'm very interested in hearing more about your issue, did you solve your problem?

    If so please share the solution with us and mark the right answers.

    If not please let me know and I will tray to help you find further solutions.

     

    Have a nice day!

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, May 3, 2011 6:06 AM
  • The problem was that I was using a library project with the wrong assembies. I removed the classes of the library and put them inside the smart device project. Finally it solved the problem. Was due to a problem in libraries.

    The program failed in a call using System.Drawing MemoryStream (ms) and then Bitmap (ms). What confused me was that previously used without problems Bitmap.

    I went back to create a library project for Smart Device and everything was left running.

     

    -regards 


    -gabriel
    • Marked as answer by Jesse Jiang Tuesday, May 3, 2011 9:20 AM
    Tuesday, May 3, 2011 9:01 AM