找不到元数据文件"SendGrid" [英] Metadata file 'SendGrid' could not be found

查看:79
本文介绍了找不到元数据文件"SendGrid"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个Azure函数来发送电子邮件.我添加了以下代码,但是出现一个错误,即找不到SendGrid.我不想使用SendGrid绑定.

I am trying to create an Azure function that will send an email. I added the following codes, but I am having an error that the SendGrid could not be found. I don't want to use the SendGrid bindings.

#r"SendGrid"

#r "SendGrid"

使用

谢谢!!

Ariel

推荐答案

我假设它是Azure Functions 2,因为默认情况下Function 1包含SendGrid.

I'm assuming it's Azure Functions 2, since Functions 1 had the SendGrid included by default.

这是您需要做的.

-停止您的应用服务

-前往Kudu CMD

- Go to Kudu CMD

-编辑"extensions.csproj"

- edit the "extensions.csproj"

-添加< PackageReference Include ="Microsoft.Azure.WebJobs.Extensions.SendGrid"版本="3.0.0&"; />  到"ItemGroup"内部的文件

- Add <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SendGrid" Version="3.0.0" /> to the file inside "ItemGroup"

-保存文件

-运行以下脚本:

dotnet build extensions.csproj -o bin --no-incremental --packages D:\ home \ .nuget 

dotnet build extensions.csproj -o bin --no-incremental --packages D:\home\.nuget 

这需要一段时间.

完成后,再次启动Function App,您现在应该可以引用SendGrid.

Once completed, start your Function App again, and you should now be able to reference SendGrid.

Mourten la Cour

Morten la Cour


这篇关于找不到元数据文件"SendGrid"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆