2

While using WindowsAzure.Storage 7.2.1 one function is fine, but other functions depend on 8.5 and they fail. If I'm using WindowsAzure.Storage 8.5 to upload blob file it throws an error:

Can't bind Blob to type Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob

How would you resolve such conflict?

Here is my code to upload a blob:

public static void Run(other params, IBinder binder)
{
        string fileUrl = $"test-blob/{Guid.NewGuid().ToString()}";                   
        var blob = binder.Bind<Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob>(new BlobAttribute(fileUrl));
        blob.UploadText($"test text file: {fileUrl}");
}
2
  • Related: stackoverflow.com/questions/46940492/… Commented Apr 27, 2018 at 15:29
  • when I remove dependency other function throws: "Microsoft.WindowsAzure.Storage, Version=8.5.0.0" Commented Apr 27, 2018 at 15:41

1 Answer 1

3

You can't use any version of Microsoft.WindowsAzure.Storage higher than the one used by Functions runtime (7.2.1 for 1.x versions of Functions). Remove that reference from your project.

For further information see Binding redirect support.

Sign up to request clarification or add additional context in comments.

1 Comment

Functions V2 is now in general availability and provides much more flexibility in this area.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.