assembly.reflectiononly

C# Assembly.Load vs Assembly.ReflectionOnlyLoad

Hi all, I'm trying to understand the differences between Assembly.Load and Assembly.ReflectionOnlyLoad. In the code below I am attempting to find all of the objects in a given assembly that inherit from a given interface: var myTypes = new List<Type>(); var assembly = Assembly.Load("MyProject.Components"); foreach (var type in asse...

Why is ReflectionOnlyAssemblyResolve not executed when trying to Assembly.ReflectionOnlyLoad?

I'm trying to load a few modules via hooking into the AppDomain.AssemblyResolve and AppDomain.ReflectionOnlyAssemblyResolve events. While I got the former to work, I fail miserably on the latter. I've boiled my problem down to this little program: public static class AssemblyLoader { static void Main(string[] args) { App...

Getting types in mscorlib 2.0.5.0 (aka Silverlight mscorlib) via reflection on?

Hello, I am trying to add Silverlight support to my favorite programming langauge Nemerle. Nemerle , on compilation procedure, loads all types via reflection mainly in 2 steps 1-) Uses Assembly.LoadFrom to load assembly 2-) Usese Assembly.GetTypes() to get the types Then at the end of compilation it emits the resolved types with Re...

Weird FileLoadException when loading assembly referenced by WPF project using Assembly.ReflectionOnlyLoadFrom

I have a custom MSBuild task that peeks inside an assembly to get some attribute meta-data. Assembly assembly = Assembly.ReflectionOnlyLoadFrom(AssemblyFile) This is used by our automated build/release process, and has been working perfectly against assemblies used by and referenced from class libraries, console apps and web projects....

Cannot reflect over assembly that shares a dependency of different version

Here's the scenario using Assembly.ReflectionOnlyLoadFrom: Both my assembly Inspected and my reflection Application Inspector reference Assembly Dependency. If Inspector references Dependency 1.0.0.0 and Inspected references Dependency 1.1.0.0, Inspector cannot reflect over any types or methods in Inspected that use a type from Depende...