Using Nuget and the .NET Framework in our Azure Functions is easy and straight forward. We can give our Azure functions alot of power and functionality.
Using the .NET Framework
For framework assemblies, add references by using the #r "AssemblyName" directive.
For example if we want to use
System.Data.SqlClient we would need to add a #r directive to the top of our code like this
This will allow us to use the SQLClient libarary of the .net framework.
If you are wondering where to get started check out our Azure Functions Getting Started
In our Function we need to add a "project.json" file. Go to View Files and add a new file and name it project.json
In our Project.json we want to add the following
This will load the nuget package of Newtonsoft Json into our function.
Then in our code we just reference
And now we can use our Nuget package in our Azure Function.