Hi Danielngai-6932,
You can add a probing path to your application's .config file, and it will only work if the probing path is a contained within your application's base directory.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin2\subbin;bin3"/>
</assemblyBinding>
</runtime>
</configuration>
You can also use the AppDomain.AssemblyResolve event and manually load the dependencies from your DLL directory.
More details you can refer to the following threads.
How to add folder to assembly search path at runtime in .NET?
c# Class Library Project - Load DLL from same folder?
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.