Most .NET developers make heavy use of the NuGet packages repository to leverage libraries implemented by Microsoft and third-party providers. The process of adding dependencies on external libraries in C# script-based functions is different from a traditional .NET application.
There are the following two ways to reference an external assembly in a C# script-based function:
- Using an #r directive
- Adding a reference in the project.json file
Let us explore both options in more detail.