Reputation: 1444
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}");
}
Upvotes: 2
Views: 250
Reputation: 35134
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.
Upvotes: 3