Our C# app currently has a native C shared library from which we call a couple of functions using the Pinvoke "DLLImport". The issue is, we haven't found a way to include the shared library with the single file publish option.
This means that we'd have to give the app executable and a platform specific library file to the users, which is not ideal.
Added context: The library was already compiled for Linux (.so), macOS (.dylib) and Windows (.dll). The Pinvoke in this case handles choosing the correct one during dev and debug, and the publish config handles choosing which one to include based on the platform target. The library was compiled as an independent shared library for all three operating systems as well, without external dependencies. Runtime version is dotnet 7.
Is it possible to include this library file together with the single file executable?
We've tried the "Include native libraries for self extract" option, but it didn't include the library with it. As soon as the app reaches a library function it can't find the dll.