Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Nuget Packages hosted in private Nuget server in Azure Functions

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?

Thanks!

like image 371
Krishh Avatar asked Apr 19 '16 02:04

Krishh


People also ask

How do I access private NuGet packages?

Go to Tools > NuGet Package Manager > Package Manager Settings, select Package Manager Sources, and then click the + button. Choose feed Name, set the feed URL to: https://nuget.telerik.com/nuget, and click OK. Create or load your project. Go to Tools > NuGet Package Manager > Manage NuGet Packages for a solution.

How do I download a private NuGet package?

In Visual Studio, click Tools > Nuget Package Manager > Package Manager Settings. Select Package Sources and add your private server url in there. After that, when you click Manage Nuget Package for Solution, you will see drop down list on the right side with your private Nuget Server as a Package source.


1 Answers

Krishh,

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>

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.

like image 173
Fabio Cavalcante Avatar answered Oct 08 '22 17:10

Fabio Cavalcante