Pretty sure there's nothing you can do in this regard when you are missing dependencies that are required to load the assembly (assembly-level Attributes, base classes, etc must all be loaded to load the metadata for an assembly -- note that this does not include dependencies that are only inside method bodies, those are only loaded when the method is JIT'ed).
In your case, if you believe you have copied all dependencies correctly, run the fusion log viewer (or ToString a TypeLoadException) to see the fusion log to see what it's specifically complaining about (I don't think FileNotFoundException contains all the useful information such as which assembly caused the load and which it failed on and where all it searched). Adam.. -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Graeme Taylor Sent: Thursday, November 08, 2007 11:04 AM To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM Subject: Re: [ADVANCED-DOTNET] Reflection: Get list of types without loading assembly Lol - nothing I like for than some light bedtime reading :o| As a temporary workaround, I've copied all dependencies to the directory - still get a FileNotFound. The parameter being passed in is @"c:\mySupportApp\staging\myApp.Plugins.Email.dll" Code is: private List<string> GetTypesFromAssembly(string assemblyName) { AppDomainSetup ads = new AppDomainSetup(); ads.ApplicationBase = Path.GetDirectoryName(assemblyName); AppDomain secondDomain = AppDomain.CreateDomain ("PluginDomain", null, ads); Assembly asm = secondDomain.Load(AssemblyName.GetAssemblyName (assemblyName)); // remainder ommited - error at line above } Any ideas? =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com