I am unable to run my Azure function on the cloud when I publish it!

Because of which I am writing a new function app in the portal with C#, I am unable to import the needed packages specifically these two.

using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.WindowsAzure.Storage.DataMovement;

What is the best way to import them?

Why do function apps work fine locally and not when published to azure, will this issue ever be solved, even a simple straight forward blob triggered function app created with the default template does not seem to work properly when published to the portal?

1

There are 1 answers

2
hujtomi On

You have to reference the missing external assembly: https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-csharp#referencing-external-assemblies

So, your function should start like:

#r "Microsoft.WindowsAzure.Storage"
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.WindowsAzure.Storage.DataMovement;