How to create nuget package for native C++

前端 未结 2 1376

I want to publish package about sdl_mixer, it\'s a native package. I did as tutorial said. I put .dll .hand .lib files into pa

2条回答
  •  清歌不尽
    2021-02-13 02:50

    I searched around for days until I found there is really no help out there on the internet at all. I did managed to piece together how to do it, and through trial and error got it working well. Which I have documented here:

    https://digitalhouseblog.wordpress.com/2019/08/22/how-to-make-a-nuget-package-for-c/

    But I'll summarize here anyways:

    • Gather or stage your native library files into a folder of your choosing.
    • Create a *.nuspec file in that folder.
    • Edit the *.nuspec file to include the files you want to include in your package.
    • Create a *.props file
    • Call nuget pack to create the package.
    • Push the nuget package to a feed somewhere.
    • Create a packages.config file.
    • Edit the visual studio project file to import the *.props file

    Notice that the nuget tools inside the visual studio IDE are NEVER used. You have to do a LOT manually. See the link for full details and explanations.

提交回复
热议问题