I realize there is a somewhat related thread on this here: Loading assemblies and its dependencies
But I am modifying something and this doesn’t exactly apply.
string path = Path.GetDirectoryName( pathOfAssembly ); Environment.CurrentDirectory = path; Assembly.Load(Path.GetFileNameWithoutExtension(pastOfAssembly));
Is there any really reason you would do it like this? Wouldn’t it make more sense to just use:
Assembly.LoadFile(pathOfAssembly);
Any insight would be greatly appreciated.
Looks like the ‘Department of Redundancy Department.’
A lot more code than is necessary. Less is more!
Edit: On second thought, it could be that the assembly you are loading has dependencies that live in its own folder that may be required to use the first assembly.