Using NuGet libraries

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.

Get Serverless computing in Azure with .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.