我使用的是QueueTrigger具有以下特徵:Azure的功能是function.json
public static void Run([QueueTrigger("tester")]string myQueueItem,[Blob("local/{queueTrigger}")]ICloudBlob myBlob,TraceWriter log)
在function.json結合產生的是:
"bindings": [
{
"type": "queueTrigger",
"queueName": "tester",
"connection": "AzureWebJobsStorage",
"name": "myQueueItem"
}
],
這不起作用,因爲它不會綁定適當的blob作爲綁定。如果我手動編輯正確結合,因爲它應該的function.json:
"bindings": [
{
"type": "queueTrigger",
"queueName": "tester",
"connection": "AzureWebJobsStorage",
"name": "myQueueItem"
},
{
"name": "myBlob",
"type": "blob",
"path": "local/{queueTrigger}",
"direction": "in",
"connection": "AzureWebJobsStorage"
}],
我的問題是我怎麼能表明所以function.json被適當地產生在C#代碼,輸入綁定?我知道輸出綁定你可以使用out參數來修飾它,但是對於輸入參數呢?這是一個錯誤還是我錯過了什麼?
什麼版本的CLI您使用的是?你正在使用哪個版本的'Microsoft.NET.Sdk.Functions'?你可以在你的csproj – ahmelsayed
中發現我正在使用函數1.0.0並通過Visual Studio工具來做 – Dexterity