![](/img/trans.png)
[英]appsettings.json values not binding in Azure Functions App V3
[英]Which Namespace or Nuget Binding BlobProperties in Azure Functions V3
是否有 Nuget/Assembly/Library 允許我在本地環境和 Azure 環境中為 .NET Core Azure 3.x 函數綁定 BlobProperties?
我有一個在 .NET Core 3 上運行的 Azure 函數,其簽名如下所示:
public async Task DoFunctionWork([BlobTrigger("path/to/{blobName}")] Stream blobStream,
**Microsoft.Azure.Storage.Blob.BlobProperties Properties**)
{
//Function Body....
}
問題出在 Properties 參數上。 如果在本地運行,則只有在 BlobProperties 參數前面加上 Microsoft.Azure.Storage.Blob 命名空間作為前綴才能解決它。 在 Azure 中,它似乎永遠不會奏效。 當它失敗時 - 在 Azure 或本地 - 我收到以下消息之一:
Can't bind properties to type 'Azure.Storage.Blob.Properties' or Can't bind properties to type 'Microsoft.Azure.Storage.Blob.Properties'
有沒有人遇到過這個? 你是怎么解決的?
謝謝。
看起來這是因為,您的 SDK 需要的版本與您安裝的版本之間存在版本不匹配。
例如,如果您使用的是 3.0.9 版本的 Function SDK,那么您可能安裝了除(>= 3.0.0 && < 3.1.0)
版本之外的Microsoft.Azure.WebJobs
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.