views:

108

answers:

2

Hi, i've a c# wincontrol that depends on a bunch of c++ unmanaged dlls.

dotnetctrl.dll
 +
 +--myliba.dll
 +
 +--mylibb.dll

Is there a way to include these mylib[a|b].dll when deploying the dotnetctrl.dll? i.e. When in a project I add a reference to dotnetctrl, is there a way to make the mylib dlls available in the right path just like .NET assembly?

thanks a lot

A: 

Copy the DLLs to the directory where the .NET binary file is and it will load the unmanaged DLL's within that directory.

Hope this helps, Best regards, Tom.

tommieb75
A: 

Click on the unmanaged DLLs, then in Properties, change the "Build Action" to "None" and the Copy to Output Directory to "Copy if newer"

Dave
hopefully, I am answering your question correctly. This will, upon building your project, automatically copy those files (wherever they are) into the same folder as your .NET assemblies.
Dave