简体   繁体   中英

How to set folder in a visual studio 2017 solution for searching DLLs there?

I would like to use openCV with EmguCV, but I dont want to add openCV dlls as a reference, and I also don't want to copy all openCV dlls to bin folder. How can I give a folder to my project to let it know that the required dlls are there?

I think THIS is something you are looking for, you should follow the (well explained) steps of the Author and you should be fine.

This will read your added embedded resource (dll in your case) and Load/compile it at runtime by its location (and other logic).

Quote:

The DLLs are not distributed with the application, when the application fails to locate the DLL, it raises an Event of AppDomain.CurrentDomain.AssemblyResolve. AssemblyResolve is requesting the missing DLL. Then, we will tell our application to look for the DLL in memory. Use EmbeddedAssembly.Get to retrieve the DLL from memory and pass it for AssemblyResolve to handle the rest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM