所以我是 C# 中 Azure 函数的新手,我正在尝试使用 BlobStorage 触发器在 Visual Studio 中创建。在遵循模板时,我得到了一个看起来像这样的文件:
using System;
using System.IO;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host.Triggers;
using Microsoft.Extensions.Logging;
namespace BasicAzureFunction
{
public static class Function1
{
[FunctionName("Function1")]
public static void Run([BlobTrigger("samples-workitems/{name}", Connection = "")]Stream myBlob, string name, ILogger log)
{
log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name} \n Size: {myBlob.Length} Bytes");
}
}
}
Run Code Online (Sandbox Code Playgroud)
我总是收到这个错误:
The type or namespace name 'BlobTriggerAttribute' could not be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)
我很确定我有所有的包(这实际上是模板)。我错过了什么?
使用 .Net …