I have a project with a CLI application and a DLL, which is a dependency of the CLI application.
The DLL project contains a native DLL, which is used by means of P/Invoke. This DLL is marked as Content. When I build my project, the DLL is copied to the output directory and my application runs fine.
When I publish a ClickOnce deployment. The DLL is not included in the resulting package and my application will fail to run correctly.
Answers to similar questions always recommend setting the file to Content, which I already have and which has no effect on the issue. Other answers suggest to make sure the file is included in the Application Files section of the publishing options, but the file is not listed there.