dgiagio / warp

Create self-contained single binary applications
MIT License
1.91k stars 92 forks source link

.NET Core native dependency problems #22

Closed denisvlah closed 5 years ago

denisvlah commented 5 years ago

The application has a dependency to native library (.so) file. It is extracted from the resources of .dll file and placed into the same folder where the executalbe is running. When the warped application is running it cannot see native libraries that are placed in the working directory. Not warped application working fine.

Target OS: ubuntu 18.01 netcore SDK version: 2.1.502 Target framework: netcoreapp2.0

If I copy ntive libs into the publish warping it then everything works.

CoolOppo commented 5 years ago

If I copy ntive libs into the publish warping it then everything works.

This sounds like everything is working the right way then. When you run the "warped" exe, it actually extracts everything inside and runs it within a temporary dir, so it's going to be looking for those binaries in the temp dir. I don't think Windows actually searches for .dlls in the working directory, it probably just looks for those directly adjacent to the real exe (which like I said is in a temp folder with the rest of the stuff you packed inside).

denisvlah commented 5 years ago

Agree, my code should be refactored to extract native libe to the same folder where netcore exe is deployed. Closing the ticket.