Dheeman Dutta

Just Another Blog.....

  Home  |   Contact  |   Syndication    |   Login
  39 Posts | 1 Stories | 29 Comments | 12 Trackbacks

News



Archives

Post Categories

.NET Links

Wednesday, January 07, 2009 #

I was trying to load PropertyInfo object using Reflection , when I came accross a very strange thing. I was loading the Assembly using 1) Asembly.LoadFile() and then 2) did a GetTypes() Unfortunately it was throwing an exception that it was unable to load all properties while performing the GetTypes(). However the Assembly.Load() was performing as expected. Digging into the details of the root cause of exception I found out that the assembly that I was trying to load dynamically was dependent on other types, which it could not load. I found a roundabout in working with this I did a 1) Asembly.LoadFrom() and then 2) did a GetTypes() and it worked.. Still trying to figure out why the previous one did not work. Any ideas??? Cheers