Pregunta

I'm using licensed library(c++ dll) for developing c# application.

I don't have any codes of that library, and that's not clr.

but I can import its methods on c# by using pInvoke like below.

[DllImport("FaceFinding.dll", ExactSpelling = true, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)]
unsafe internal static extern int EnrollmentGalleryDBOneToOne(StringBuilder currentFolderPath);

It works perfectly on debug mode.

but here's problem.

when I make Visual studio Installer project, I cannot import that dll file on installer because that's non-clr.

is there some way to import non-clr dll on c# installer project?

No hay solución correcta

Otros consejos

Put all of your unmanaged DLL's (including FaceFinding.dll) in the output folder, in the File System editor of your installer project. This way they will be published along with your application.

As a side note I would also suggest making sure that the license of this 3rd party DLL allows you to distribute it with your application by examining its license agreement.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top