鼎鼎知识库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2020.11.4搭建私有NuGet服务器.md 1.3KB

4 years ago
4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # 服务器配置
  2. - 下载BaGet Release版本
  3. - 添加应用程序池
  4. - 配置API Key
  5. - 配置web.config
  6. ```
  7. <system.webServer>
  8. <modules runAllManagedModulesForAllRequests="false">
  9. <remove name="WebDAVModule" />
  10. </modules>
  11. <handlers>
  12. <remove name="WebDAV" />
  13. <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
  14. <add name="WebDAV" path="*" verb="*" modules="WebDAVModule" resourceType="Unspecified" requireAccess="Write" />
  15. </handlers>
  16. <aspNetCore processPath="dotnet" arguments=".\BaGet.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
  17. </system.webServer>
  18. ```
  19. # 打包和发布
  20. - 来到类库根目录下
  21. - 打包
  22. ```
  23. dotnet pack
  24. dotnet pack --configuration release
  25. ```
  26. - 发布
  27. ```
  28. dotnet nuget push -s http://47.103.61.198:5000/v3/index.json -k DD-NuGet --force-english-output BaGetDemo.Lib.1.0.0.nupkg
  29. ```
  30. - 删除
  31. ```
  32. dotnet nuget delete BaGetDemo.Lib 1.0.0 -s http://47.103.61.198:5000/v3/index.json -k DD-NuGet --force-english-output
  33. ```
  34. - 查看当前的Nuget源
  35. ```
  36. dotnet nuget list source
  37. ```
  38. - 查看帮助
  39. ```
  40. dotnet nuget --help --force-english-output
  41. ```
  42. # VS配置NuGet数据源
  43. ```
  44. 工具--选项
  45. ```