How to retrieve NuGet packages in Azure Functions

Hello,

In this blog post I will show you how to retrieve NuGet packages in your Azure Function

For this post, as example, I took the NuGet packages from Microsoft :

Microsoft.SharePointOnline.CSOM 16.1.4915.1200 and WindowsAzure.Storage 8.0.0

How to do :

  1. Go to your Azure Function, and open it
  2. Open the View Files tab
  3. Click on “+ Add”
  4. Create a file called “project.json”
  5. Open the file and add the following :
    {
     "frameworks": {
     "net46":{
     "dependencies": {
     "Microsoft.SharePointOnline.CSOM": "16.1.4915.1200",
     "WindowsAzure.Storage":"8.0.0"
     }
     }
     }
    }
    
  1. Press the save button and you will see your Azure Function downloading your nugget packages.

The end result looks like this :

snip_20170217182220

You’re now ready to code ! 🙂

Advertisements
This entry was posted in Azure, C# Solutions and tagged , , , . Bookmark the permalink.

One Response to How to retrieve NuGet packages in Azure Functions

  1. Pingback: Azure Function App: Reference a Custom DLL | Loïc Sterckx – Software Engineer Azure PaaS, Office 365 & SharePoint

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s