You can partially disregard my last email (the part about the fusion log, you won't need it) I didn't actually thoroughly read your code :)
Your code below causes the Assembly to load in both AppDomains. The "secondDomain.Load" loads it into the second AppDomain and your reference causes it to load in the primary AppDomain. You'll need something like so: class MyAsmInspector : MarshalByRefObject { public List<string> GetTypesFromAssembly( string assembly ) { // your code here to load the assembly and get its types } } MyAsmInspector inspector = secondDomain.CreateInstanceAndUnwrap( ... ); Inspector.GetTypesFromAssembly( assemblyPath ); 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