C# “;类型或命名空间‘;BlobTrigger’;找不到”;

C# “;类型或命名空间‘;BlobTrigger’;找不到”;,c#,azure,.net-core,compiler-errors,azure-functions,C#,Azure,.net Core,Compiler Errors,Azure Functions,所以我不熟悉C#中的Azure函数,我正尝试在Visual Studio中使用BlobStorage触发器创建。在遵循模板的过程中,我收到了一个类似以下内容的文件: using System; using System.IO; using Microsoft.Azure.WebJobs; using Microsoft.Azure.WebJobs.Host.Triggers; using Microsoft.Extensions.Logging; namespace BasicAzureFun

所以我不熟悉C#中的Azure函数,我正尝试在Visual Studio中使用BlobStorage触发器创建。在遵循模板的过程中,我收到了一个类似以下内容的文件:

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");
        }
    }
}
我总是会遇到这样的错误:

The type or namespace name 'BlobTriggerAttribute' could not be found (are you missing a using directive or an assembly reference?)
我很确定我有所有的软件包(这就是模板)。我错过了什么

使用.Net内核


提前谢谢

我有一个Azure函数,它也使用BlobTrigger,它对我来说工作正常

我有一个命名空间,但在您共享的代码中没有看到

使用Microsoft.WindowsAzure.Storage.Blob

我的项目中有这些Nuget包

<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.24" />


这就是Azure函数项目中的所有代码吗?是的,除了local.settings.json和host.json文件之外,我没有碰它们