views:

507

answers:

2

Hi All,

I have a collection of unmanaged dlls with a C# wrapper around them that I'm calling from a C# project. I've added a build event line that looks like:

mkdir ..\Release
mkdir ..\Debug
copy ..\..\Includes\*.dll ..\Release\*.dll
copy ..\..\Includes\*.dll ..\Debug\*.dll

Problem is, when I go to publish the application, those dlls aren't included, and the publication is worse than useless, since it creates an application that runs until you call one of those dlls.

So, how do I include unmanaged dlls when I publish the project?

+2  A: 

And the answer is: don't publish this, use the windows installer instead, as described here.

mmr
+1  A: 

I'm currently investigating the same issue. The literature on the topic is very sparse indeed!

The only solution I can see is to embed the unmanaged DLL as an embedded resource inside the assembly, and programatically extract it out to the executing path before calling any functions.

NoizWaves