且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

访问Azure Functions中的私有Nuget服务器中托管的Nuget程序包

更新时间:2023-02-08 23:14:46

克里希(Krishh)

Krishh,

这可以像通常那样使用nuget.config文件来实现:

This is possible using a nuget.config file as you normally would:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="MyPrivateFeed" value="http://myhost/myfeed" />
    ... other feeds ...
  </packageSources>
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
</configuration>

使用Kudu或此处概述的其他部署方法,将该文件复制到功能文件夹或wwwroot(将应用于所有功能),然后将使用您的配置.

Using Kudu, or another deployment method outlined here, copy that file to either the function folder or wwwroot (that would apply to all functions) and your config will be used.