Since you are using C# script (.csx), and not the regular C# here, to load external assembly like "Newtonsoft.Json", "Microsoft.WindowsAzure.Storage", add below on top of your script.
#r "Newtonsoft.Json"
#r "Microsoft.WindowsAzure.Storage"
The following assemblies are automatically added by the Azure Functions hosting environment:
mscorlib
System
System.Core
System.Xml
System.Net.Http
Microsoft.Azure.WebJobs
Microsoft.Azure.WebJobs.Host
Microsoft.Azure.WebJobs.Extensions
System.Web.Http
System.Net.Http.FormattingThe following assemblies may be referenced by simple-name (for example, #r "AssemblyName"):
Newtonsoft.Json
Microsoft.WindowsAzure.Storage
Microsoft.ServiceBus
Microsoft.AspNet.WebHooks.Receivers
Microsoft.AspNet.WebHooks.Common
Microsoft.Azure.NotificationHubs
For any other outside the above list, consider adding nuget reference as mentioned in Using NuGet packages.
For anything which does not have nuget packages. follow Referencing custom assemblies.
NOTE: There are specific ways of loading assembly on .csx script in Azure Function. Luckily, in this case, 'Newtonsoft.Json' is available out of the box. Refer this for details. Also, you won't be able to upload dll from portal if WEBSITE_RUN_FROM_PACKAGE=1, you need to go via publish route.