cargo-nuget icon indicating copy to clipboard operation
cargo-nuget copied to clipboard

Directories are not created when creating .nupkg, they are put in library name instead

Open geext-dk opened this issue 4 years ago • 0 comments

Hi. I was struggling with an issue with a NuGet package created with this incredible tool. I couldn't build a docker image because of it. After an investigation I realized that a proper directory tree isn't created in the nupkg. It just creates a single file with all its directory path inside. Here I'm unzipping the resulting .nupkg and what I get:

geext@LAPTOP-C1938VO5:/mnt/c/Users/geext/source/repos/improc-petrsu/test$ ls
improc_petrsu.0.3.0.nupkg
geext@LAPTOP-C1938VO5:/mnt/c/Users/geext/source/repos/improc-petrsu/test$ unzip improc_petrsu.0.3.0.nupkg
Archive:  improc_petrsu.0.3.0.nupkg
zip-rs
  inflating: _rels\.rels
  inflating: [Content_Types].xml
  inflating: improc_petrsu.nuspec
  inflating: runtimes\linux-x64\native\improc_petrsu.so
  inflating: runtimes\win-x64\native\improc_petrsu.dll
geext@LAPTOP-C1938VO5:/mnt/c/Users/geext/source/repos/improc-petrsu/test$ ls
'[Content_Types].xml'        improc_petrsu.nuspec  'runtimes\linux-x64\native\improc_petrsu.so'
 improc_petrsu.0.3.0.nupkg  '_rels\.rels'          'runtimes\win-x64\native\improc_petrsu.dll'

so as you can see, the native libraries are put into the package with the directories in their names.

Here is a link to my repository: https://gitlab.com/geext/improc-petrsu You can test it with cargo-nuget pack in the root directroy

I use Windows 10, but the unzipping example above is actually WSL 2 (Debian)

geext-dk avatar Feb 14 '21 23:02 geext-dk