I'm trying to reference a managed DLL in my .NET project, without copying it into my output directory. So, when my program runs, it runs the DLL from the location it's installed - wherever that is. The problem lies in the fact that this managed DLL calls unmanaged DLLs. When I try and reference the managed DLL, it throws a FileNotFound Exception - Could not load file or assembly 'CharacterGen' or one of its dependencies. The system cannot find file specified
. When I set my output to be within the same directory as the DLL I'm referencing, everything works fine. The usual solution would be to also reference the DLLs which are called from within the other assembly. However, I can't reference unmanaged assemblies from my managed program.
Is there a way to reference a managed DLL which calls unmanaged DLLs?
If you asking how to get visual studio to copy the unmanaged DLL to your output directory you can do this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With