天天看點

vs環境基于github的nuget包管理

  1. 申請github使用者的key,需要庫包寫入和讀取權限
  2. 打開vs環境的終端視窗,添加nuget的源
    dotnet nuget add source -name "github" -source "https://nuget.pkg.github.com/GitHub使用者名/index.json" -u GitHub使用者名 -p GitHub的key
               
  3. 編譯生成包
  4. 在終端視窗輸入指令,釋出
    dotnet nuget push "釋出封包件的路徑" --source "github"
               

      GitHub使用者手冊文章:

https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-dotnet-cli-for-use-with-github-packages

備注:項目屬性中項目URL和存儲庫URL需要填寫