> OK, I was thinking about setting the PrivatePath on the AppDomain. > However, how do I call Assembly.Load() even with the PrivatePath set? I > only have the assembly file path and Assembly.Load() doesn't accept > this > as a parameter.
My thinking was that where you had: C:\SomePath\SomeAssembly.DLL You'd set the private path in your new AppDomain to: C:\SomePath And call Assembly.Load Assembly.Load("SomeAssembly") I can't remember offhand whether this will go to the GAC first for SomeAssembly or if it'll go to the private path first. Obviously, you want it to go to the private path first. If that doesn't work, why not set up the new AppDomain as above and then do something like: FileStream fs = new FileStream("C:\SomePath\SomeAssembly.DLL", FileMode.Open, FileAccess.Read); BinaryReader r = new BinaryReader(fs); Byte [] assemblyBytes = LoopThroughReadingBytes(r); // Need to loop to read in all bytes Assembly.Load (assemblyBytes); (All of the above is thoroughly untested, of course!) Good luck, Geoff =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com