Alienpenguin
Alienpenguin

Reputation: 1067

Deploy unmanaged dependecy dll within a .NET control

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?

Upvotes: 3

Views: 1021

Answers (2)

t0mm13b
t0mm13b

Reputation: 34598

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.

Upvotes: 0

Dave
Dave

Reputation: 15016

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

Upvotes: 2

Related Questions