How to add folder to assembly search path at runtime in .NET?

Sounds like you could use the AppDomain.AssemblyResolve event and manually load the dependencies from your DLL directory. Edit (from the comment): AppDomain currentDomain = AppDomain.CurrentDomain; currentDomain.AssemblyResolve += new ResolveEventHandler(LoadFromSameFolder); static Assembly LoadFromSameFolder(object sender, ResolveEventArgs args) { string folderPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string assemblyPath = Path.Combine(folderPath, new AssemblyName(args.Name).Name + “.dll”); if (!File.Exists(assemblyPath)) return null; Assembly assembly = … Read more

How to enable assembly bind failure logging (Fusion) in .NET

Add the following values to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion Add: DWORD ForceLog set value to 1 DWORD LogFailures set value to 1 DWORD LogResourceBinds set value to 1 DWORD EnableLog set value to 1 String LogPath set value to folder for logs (e.g. C:\FusionLog\) Make sure you include the backslash after the folder name and that the Folder … Read more