鼎鼎知识库
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 1004B

1234567891011121314151617181920212223242526272829303132333435363738
  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 BaGetDemo.Lib.1.0.0.nupkg
  29. ```
  30. # VS配置NuGet数据源
  31. ```
  32. 工具--选项
  33. ```