Whoops, nix the AssemblyName note since that's only applicable to
Assembly.Load.

Setting the ApplicationBase property of the AppDomainSetup you can pass to
create an AppDomain should work.

-----Original Message-----
From: Adam Sills [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 08, 2007 10:31 AM
To: 'Discussion of advanced .NET topics.'
Subject: RE: [ADVANCED-DOTNET] Reflection: Get list of types without loading
assembly

You can always override the codebase of an AppDomain you're creating to be
the location of the plugin DLL.

You can also use ReflectionOnlyLoad if you pass an AssemblyName object,
which can be retrieved via AssemblyName.GetAssemblyName( string assemblyPath
) which sets the codebase for your loaded assembly so fusion will search
there for dependencies (I thought LoadFrom did that also).

On the other hand, if there are dependencies missing, and any Type in the
assembly your loading requires that dependency for its function (return
values of functions, property return values, etc) then Assembly.GetTypes()
will fail anyway with a TypeLoadException (or FileNotFoundException or
somesuch).

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to