1. 程式人生 > >Asp.net core 學習筆記 (library)

Asp.net core 學習筆記 (library)

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.