Deploying Bitbucket to Azure Web Site: add private nuget package server

微笑、不失礼 提交于 2019-11-30 09:15:12

You can add a custom NuGet.config file at the same level as your .SLN file.

You can then make the following modifications (assuming that your private feed requires authentication, create a set of credentials which only are used for this site):

<activePackageSource>
  <add key="All" value="(Aggregate source)" />
</activePackageSource>
<packageSources>
  <add key="nuget.org" value="https://www.nuget.org/api/v2/" />
  <add key="custom_package_source" value="https://custom_package_source/nuget/v1/FeedService.svc/" />
</packageSources>
<disabledPackageSources />
<packageSourceCredentials>
  <custom_package_source>
    <add key="Username" value="CustomUsername" />
    <add key="ClearTextPassword" value="CustomPassword" />
  </custom_package_source>
</packageSourceCredentials>

When you deploy via Kudu, this should allow the build process to discover your private feed, authenticate & restore your packages.

If you do not require authentication against your private feed, remove the <packageSourceCredentials> element.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!