none
ReflectionOnlyLoadFrom vs LoadFrom RRS feed

  • Question


  • If an assembly is loaded into the appdomain using ReflectionOnlyLoadFrom API, how can I change it to Assembly::LoadFrom? Or, is it ok to load an assembly using LoadFrom even if it is already loaded using ReflectionOnlyLoadFrom ?


    Friday, February 15, 2008 6:15 PM

Answers

  • Although you cannot "move" an already loaded assembly from the reflection-only context to the execution context, it is OK to load an assembly into the both contexts.

     

    But be careful - every Type, MethodInfo, etc. retrieved from the reflection-only Assembly object will not be equal to the same metadata retrieved from the "full" Assembly object.

    The metadata retrieved from the reflection-only Assembly object retains all the restrictions of the reflection-only context.

     

    --ab

    Saturday, February 16, 2008 11:19 PM