我使用 Visual Studio 2017 创建了我的 Azure Function v2。
我创建了一个新的队列触发器函数。
using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
using Microsoft.Extensions.Logging;
namespace Functions
{
public static class queue
{
[FunctionName("queue")]
public static void Run([QueueTrigger("myqueue-items", Connection = "test")]string myQueueItem, ILogger log)
{
log.LogInformation($"C# Queue trigger function processed: {myQueueItem}");
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是找不到QueueTrigger的程序集
Error CS0246 The type or namespace name 'QueueTriggerAttribute' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'QueueTrigger' could not be …Run Code Online (Sandbox Code Playgroud)