none
Yet another TypeLoadException RRS feed

  • Question

  • Hello,
     
    I have the following scenario:

    - (A) DLL with my base class (this is not a project in the solution)
    - (B) DLL with my code (this is a project in the solution), this project refer to (A)
    - (C) EXE calling the start metodo of my Code DLL (this is the main project in the solution), this project refer to (B)
    - I have the following class:

     interface IController<T> ... defined on (A)
     abstract Controller<T> : IController<T> ... defined on (A)

     enum AppState ... defined on (B)

     BaseController : Controller<AppState> defined on (B)
     LoginController : BaseController defined on (B)

    - On (C) if I do typeof(LoginController) it throws TypeLoadException

    I can see that all modules that I need are load by using Debug Menu -> Windows -> Modules which the most recent version. All projects are compiled in debug mode. I can typeof() other classes in (B) that doesn't inherit BaseController without any problem.

    Now the really odd thing: It works on devices running WM6 but not devices with WM4 and WM5.

    Any ideas?

    TIA,
    Sergio

    Wednesday, December 10, 2008 3:05 PM

Answers

  • CLR doesn't ship on devices.
    It's Compact Framework that ships for WM, try ask on their forums.

    -Karel
    • Marked as answer by Zhi-Xin Ye Tuesday, December 16, 2008 4:28 AM
    Thursday, December 11, 2008 1:28 AM
    Moderator

All replies

  • Found more odd behavior. Created:
     
    - (D) FooController : Controller<AppState> ... gives me no error when calling typeof()
    - (E) FooController : BaseController ... gives me TypeLoadException when calling typeof()

    To me seems like a bug somewhere in CLR.

    Wednesday, December 10, 2008 6:10 PM
  • CLR doesn't ship on devices.
    It's Compact Framework that ships for WM, try ask on their forums.

    -Karel
    • Marked as answer by Zhi-Xin Ye Tuesday, December 16, 2008 4:28 AM
    Thursday, December 11, 2008 1:28 AM
    Moderator