A while back I wrote an article on how to use a personal nuget feed with Azure functions.
As a side note; I was pleasantly surprised to find that it features quite highly on Google search (more luck than judgement):
Anyway, while that is all well and good, it doesn't work with Version 2 of the Azure Functions.
Like my previous research, there was very little documentation on this. I'd supect that most "serious" Azure Function work is being done in C# using Visual Studio or VS Code - very little is being done in the portal and CSX.
(I generally only using the portal and CSX for quick experiments)
So after much experimentation, I believe this is the way to do it;
Add a "function.proj" file similar to the below at the same level as your run.csx:
The file itself is in MSBuild Proj format - which is the first major change from working with Azure Functions V1.
The second major change is that the file contains the nuget package AND the source. Previously the source was configured using nuget.config.
In this example, I use the RestoreSources to define the list of sources nuget should use. This list should be semicolon delimited. Obviously replace https://www.myget.org/F/red-folder/api/v3/index.json with your own feed.
I then add the packages to be loaded as a PackageReference - you would add one for each nuget package you want to import.
Then all you need to do is add the relevant "using" to your run.csx.
Once you know how, nice and easy.
Please let me know if this does/ doesn't work for you - seem good for me - but has been arrived at via experimentation.
Blog Header image by rawpixel.com from Pexels