Load Assembly Type.GetType("Class,Assembly")

  • Thread starter Thread starter Mohamed Zaki
  • Start date Start date
M

Mohamed Zaki

Dear All,

How Can i load an assembly located in the bin folder of an asp.net
application using the Type, ie.e
Type type=Type.GetType("Namespace.class,assembly"), i used the previous
command and it it returns null, is there any clues for what i'm missing.

Regards,
Mohamed
 
Your right - it should load the type correctly if assembly can be found. I
find that sometimes you need to use the fully qualified name of the assembly
such as:

System.Windows.Forms.Form, System.Windows.Forms, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089

This is especially true if mutiple versions exists or the reference is
ambiguous. Hope that helps.
Mike
 
Thank you Mike, i tried the fully qualified name but the samething happened
:(

Regards,
Mohamed
 
Hi Mike,

When i load the assembly using system.reflection.assembly.load
then from the returned assembly use gettype, it work fine, my questions now,
ain't Type.GetType load the assembly directly if it placed inside the bin
folder ?

Appreciating your help so much.
 
Back
Top