0

I want my Azure Function to pull packages from both nuget.org and a private nuget feed. Is this possible? In particular, how would I format the project.json file to indicate which feed a given package comes from?

The following two questions are related, but don't address using multiple feeds at once, nor do their answers indicate what the project.json file would look like in this case.

How can I use NuGet packages in my Azure Functions?

How do you use custom NuGet feeds with Azure Functions?

BobbyA
  • 2,090
  • 23
  • 41
  • 1
    Maybe just use precompiled project instead of scripts? – Mikhail Shilkov May 18 '18 at 19:00
  • I'm on Visual Studio 2015, and the steps I followed in the link below don't seem to be working. (specifically, appsettings.json is not generating. https://blogs.msdn.microsoft.com/appserviceteam/2017/03/16/publishing-a-net-class-library-as-a-function-app/ – BobbyA May 18 '18 at 21:51
  • It is possible to customize the feeds through the Nuget.Config file in the Function App root. Find more details at https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-csharp and https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior. – Evandro de Paula May 18 '18 at 22:08
  • @EvandroPaula how do you update the project.json file to reference packages from multiple nuget feeds? – BobbyA May 18 '18 at 22:16
  • @BobbyA, per documentation you will need to add the NuGet.Config file in the root of the function application along with other files (e.g. run.csx, project.json, etc.). You can add the file in the Azure Portal via View Files (right side on the function view) or via Platform Features -> App Service Editor. – Evandro de Paula May 21 '18 at 20:22
  • @EvandroPaula I'm asking about the contents of the project.json file. All of the examples I've found are of a project.json file that's referencing packages from a single nuget feed, rather than multiple nuget feeds. – BobbyA May 21 '18 at 21:44

0 Answers0