refer :
https://docs.microsoft.com/en-us/dotnet/core/tutorials/library-with-visual-studio
https://docs.microsoft.com/en-us/dotnet/core/tutorials/consuming-library-with-visual-studio?tabs=csharp
https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-pack?tabs=netcore2x
https://docs.microsoft.com/en-us/nuget/hosting-packages/overview
开一个项目, 创建 library -> 写 code -> build
另一个项目, add reference 指向 library dll 就可以调用了.
要发布的话使用 dotnet cmd
dotnet pack --configuration release -p:PackageVersion=1.0.0-beta
然后发布到 nuget, 如果要私有的话,要自己架构 nuget server.