Tech Off Thread

2 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

TypeLoad exception, when using GetType

Back to Forum: Tech Off
  • User profile image


    Im trying to load an assembly(In code), and get a type from it.

    I do it in this way:

    host = New ServiceHost(Type.GetType(node.Attributes("name").InnerText,True, True));
    But the last line, throws me this exception: System.TypeLoadException was unhandled Message="Could not load type Service.Service1' from assembly Service, Version=, Culture=neutral, PublicKeyToken=null'."
    Anyone ever encountered this? Or can see what im doing wrong?


  • User profile image

    Check to ensure that your "name" attribute is the fully qualifed namespace for the class you are trying to load.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.