简体   繁体   中英

Which Namespace or Nuget Binding BlobProperties in Azure Functions V3

Is there a Nuget/Assembly/Library that will allow me to bind BlobProperties for .NET Core Azure 3.x Functions, in both a local environment and in an Azure environment?

I have an Azure Function running on .NET Core 3 with a signature that looks like this:

public async Task DoFunctionWork([BlobTrigger("path/to/{blobName}")] Stream blobStream, 
**Microsoft.Azure.Storage.Blob.BlobProperties Properties**)
{
    //Function Body....
}

The problem is with the Properties parameter. If run locally, it can only be resolved if I prefix the BlobProperties parameter with the Microsoft.Azure.Storage.Blob namespace as above. In Azure, it never seems to work. When it fails - on either Azure or locally - I get one of the following messages:

Can't bind properties to type 'Azure.Storage.Blob.Properties' or Can't bind properties to type 'Microsoft.Azure.Storage.Blob.Properties'

Has anyone encountered this before? How did you solve it?

Thanks.

It looks like this is because, there is a version mismatch between what your SDK requires and what you have installed.

For instance, if you are using 3.0.9 version of Function SDK, then you might have installed Microsoft.Azure.WebJobs other than (>= 3.0.0 && < 3.1.0) versions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM