I am trying to create a Nuget package for a library that depends on ghostscript and therefore references gsdll32.dll - an unmanaged library. I can\'t just included that a st
Add a build
folder to the package and, if the package for example has the id MyPackage
, add a MSBuild target file called MyPackage.targets
to this folder. It is important that the .targets
file has the same name as the .nuspec
file. In the .nuspec
file you must have a section like this:
This will add an MSBuild element in the project file pointing to the .targets
file.
Furthermore, to only register the managed dlls, add a section like this:
The .targets
file should look something like this:
Now, all files - including unmanaged files - will be copied to the project output folder (e.g. \bin\debug) after the build.