Publishing an Unmanaged DLL from a Reference Project

I have a C # project (call Driver on it) that uses an unmanaged DLL to interact with some hardware. I have another project that references Driver. When I create a project, the unmanaged DLL is copied to the output directory as I want. However, when I publish the project as a ClickOnce application, the DLL is not included in the application files.

In Application Files in the project properties in the Publish section, I can see a managed DLL with drivers, but an unmanaged DLL is not specified.

I am sure that there is an easy solution for this, but searches mostly lead to questions about including unmanaged DLLs in projects.

Thanks in advance,

Bjorn

+6
source share
1 answer

After exploring this yet, the solution seems to be to add the DLL as an existing element to all projects that use it. It seems, however, very awkward if you have several projects depending on this.

+3
source

Source: https://habr.com/ru/post/914534/


All Articles