0
votes

I'm using dotnet pack to create a nuget package for a .net core project but have 2 issues:

  1. The .nupkg file when inspected always has a lib folder which contains the contents of the project's bin folder. Can you prevent the lib folder from being created in the output?

  2. In the project.json packOptions how do you map an include folder to an output directory? I've tried using the mappings property as detailed below to output the contents of the publish directory into the wwwroot directory below but no luck so far.

    "packOptions": { "files": { "include": [ "publish" ], "mappings": { "wwwroot": "publish" } } },

1

1 Answers

1
votes

I was unable to remove the lib folder but the mapping works with slight modifications to the example above as displayed below:

"packOptions": { "files": { "include": [ "publish" ], "mappings": { "wwwroot/": "publish/" } } }