找不到要包含在 CosmosDBTrigger 中的正确 nuget 包

hor*_*ius 1 database visual-studio azure-functions visual-studio-2017 azure-cosmosdb

我正在尝试开发一个 azure 函数,该函数触发集合中的插入/更新。从 azure webjobs sdk 文档中,我最好的选择是 CosmosDBTrigger 函数。但是,当我使用 Visual Studio“azure 函数”扩展创建 CosmosDBTrigger 函数时出现编译错误。看起来 CosmosDBTrigger 的 vsix 没有自动包含 CosmosDBTrigger 类的 nuget 包引用。

有没有人使用 Visual Studio 2017 创建从 ChangeFeed 项触发的 azure 函数?

更新:当我尝试引入 Microsoft.Azure.Webjobs.Extensions 时,出现以下错误。

NU1608: Detected package version outside of dependency constraint: Microsoft.NET.Sdk.Functions 1.0.11 requires Microsoft.Azure.WebJobs.Extensions (= 2.1.0) but version Microsoft.Azure.WebJobs.Extensions 3.0.0-beta5 was resolved.
NU1107: Version conflict detected for Microsoft.Azure.WebJobs. Reference the package directly from the project to resolve this issue. 
    Accelerator.Feed Microsoft.Azure.WebJobs.Extensions 3.0.0-beta5 -> Microsoft.Azure.WebJobs (>= 3.0.0-beta5) 
    Accelerator.Feed -> Microsoft.NET.Sdk.Functions 1.0.11 -> Microsoft.Azure.WebJobs (= 2.1.0).
Package restore failed.
Run Code Online (Sandbox Code Playgroud)

ric*_*sch 5

根据Azure Functions 的 Azure Cosmos DB 绑定,您需要 NuGet 包Microsoft.Azure.WebJobs.Extensions.CosmosDB

Microsoft.Azure.WebJobs.Extensions.DocumentDB NuGet 包中提供了 Functions 版本 1.x 的 Cosmos DB 绑定。对于 Functions 2.x,包是Microsoft.Azure.WebJobs.Extensions.CosmosDB