小编Ric*_*ner的帖子

Azure Function 2 - 缺少 using 指令或程序集引用?

我使用 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)

.net-assembly azure-functions

3
推荐指数
1
解决办法
5043
查看次数

标签 统计

.net-assembly ×1

azure-functions ×1