'Can't reference Polly or other packages in Azure Functions

I have tried the below in a version 4 Azure Function app

#r "Polly"
using System;
using System.Threading.Tasks;

and/or

using System;
using System.Threading.Tasks;
using Polly;

But in both cases it says Polly is not found. From the docs I tried to add a framework 46 reference too in the json file for the function app but that did not work. What is the best way to import a dependency?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source