简体   繁体   English

Visual Studio 2017中Azure函数CosmosDB属性

[英]Azure functions CosmosDB attribute in Visual Studio 2017

I`m trying to make working pilot project with Azure Functions and CosmosDB input binding. 我正在尝试使用Azure Functions和CosmosDB输入绑定进行可运行的试验项目。 I have updated my Visual Studio 2017 to latest pack (15.5.5). 我已经将Visual Studio 2017更新到最新的软件包(15.5.5)。 Also I have installed latest Azure Functions SDK. 另外,我还安装了最新的Azure Functions SDK。

After I have added to Azure Functions project new CosmosDB trigered function I see the following picture after build: 将新的CosmosDB触发函数添加到Azure Functions项目之后,在构建后,我看到以下图片:

Error after build in VS 内置VS后出现错误
Nuget packages Nuget软件包

There are no any documentation about CosmosDBTrigger. 没有有关CosmosDBTrigger的任何文档。 Maybe you met this class before and can tell me where to find this magic lib in nuget, which will work for me (in which this CosmosDB attribute is defined)? 也许您之前遇到过此类,并且可以告诉我在nuget中可以找到此魔术库的地方,这对我有用(在其中定义了CosmosDB属性)?

PS: DocumentDB attribute from azure web jobs SDK not working at all, as soon as if function has this attribute azure don`t see this function at all. PS:天蓝色的Web Jobs SDK中的DocumentDB属性根本不起作用,只要函数具有天蓝色的此属性,就根本看不到此功能。 Queue binding functions works for me ok. 队列绑定功能对我有用。

Thank you. 谢谢。

CosmosDBTrigger attribute is introduced only in version 1.1.* of Microsoft.Azure.WebJobs.Extensions.DocumentDB NuGet package. 仅在Microsoft.Azure.WebJobs.Extensions.DocumentDB NuGet程序包的1.1.*版中引入了CosmosDBTrigger属性。

Unfortunately, this version is still in beta ( 1.1.0-beta4 as of today), so you need to tick Include prerelease checkbox in your Visual Studio to use it. 不幸的是,此版本仍处于beta版本(截至今天为1.1.0-beta4 ),因此您需要在Visual Studio中选中“ Include prerelease复选框以使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM