

2.重啟Visual Studio後新增專案,會在專案範本看到Nuget選項,用它新增新專案

3.開啟專案後,到NuGet.Config去修改參數,把value改成你架設的Nuget私人網站

4.開啟命令字元,到剛才的專案目錄中,利用專案附載的Nuget.exe建立你的api key
nuget.exe setApiKey {password} -Source {httq://xxx.xxx/nuget}

5.最後到Package.nuspec設定你的套件相關內容資訊,即完成設置動作。


6.最後依你的套件性質,把對應的檔案放在預設的幾個資料夾內就可以了
content : 套件的檔案,依content 下的路徑產生
lib :使用到的DLL參考
src
7.發佈時只要使用建置就會自動發佈,Visual Studio的建置選項為Debug時只會編譯不會發佈,設定成Release才會發佈。

本文為記錄操作步驟 說明建議參考:
http://blog.darkthread.net/post-2016-04-28-nuget-packager.aspx
http://blog.sanc.idv.tw/search/label/NuGet
http://blog.darkthread.net/post-2011-03-29-create-nuget-package.aspx
沒有留言:
張貼留言