Why is my Windows Application Packaging Project stripping all my native libraries from the published package?

32 views Asked by At

My application uses some native libraries from nuget packages, like ManagedWimLib.

This nuget package automatically copies the native libraries on build, targeting a number of platforms (Win, Linux, Mac...). The files are placed inside the bin folder of the application, under subfolders like

  • runtimes/[platform]/native
  • runtimes/[platform]/lib

So, when debugging the application, if you go to the bin folder of the application, the runtimes folder contains the right file structure with all their dlls.

BUT:

When I publish the packaging project, inside its bin\x64\Release\Deployer.Gui\runtimes folder, all the folders and libraries are missing. There's no .dll file in there. It looks like the packaging project is ignoring the native libraries completely.

What can I do to make it include them?

0

There are 0 answers