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

服务器配置

  • 下载BaGet Release版本
  • 添加应用程序池
  • 配置API Key
  • 配置web.config <system.webServer> <modules runAllManagedModulesForAllRequests="false"> <remove name="WebDAVModule" /> </modules> <handlers> <remove name="WebDAV" /> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> <add name="WebDAV" path="*" verb="*" modules="WebDAVModule" resourceType="Unspecified" requireAccess="Write" /> </handlers> <aspNetCore processPath="dotnet" arguments=".\BaGet.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" /> </system.webServer>

打包和发布

  • 来到类库根目录下
  • 打包 dotnet pack dotnet pack --configuration release
  • 发布

    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 
    
  • 删除

dotnet nuget delete BaGetDemo.Lib 1.0.0 -s http://47.103.61.198:5000/v3/index.json -k DD-NuGet --force-english-output
  • 查看当前的Nuget源 dotnet nuget list source
  • 查看帮助
dotnet nuget --help --force-english-output

VS配置NuGet数据源

工具--选项