访问Azure Functions中的私有Nuget服务器中托管的Nuget程序包 [英] Access Nuget Packages hosted in private Nuget server in Azure Functions

查看:80
本文介绍了访问Azure Functions中的私有Nuget服务器中托管的Nuget程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Azure Functions中访问托管在私有nuget服务器中的nuget包?有什么办法可以指定我的私有nuget服务器信息?

How can I access nuget packages hosted in private nuget server in Azure Functions?. Is there any way I can specify my private nuget server info?

谢谢!

推荐答案

克里希(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.

这篇关于访问Azure Functions中的私有Nuget服务器中托管的Nuget程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆