找不到SendGridAPIClient

时间:2019-04-06 19:35:56

标签: c# sendgrid-api-v3

在以下代码中,出现编译错误

错误CS0246找不到类型或名称空间名称'SendGridAPIClient'(您是否缺少using指令或程序集引用?)XYZ.Core.Dll XYZ.Core.Dll \ Fabric \ AppConfiguration.cs 87活动

我不确定我缺少哪个库

using SendGrid;
using SendGrid.Helpers.Mail;
using System.Collections.Generic;
using System.Net.Mail;

private static SendGridAPIClient _SendGridApiClient;

这是我在packages.config中拥有的

<package id="Sendgrid" version="9.10.0" targetFramework="net461" />
  <package id="SendGrid.Api" version="1.0.7" targetFramework="net461" />
  <package id="SendGrid.CSharp.HTTP.Client" version="3.3.0" targetFramework="net461" />
  <package id="SendGrid.SmtpApi" version="1.3.3" targetFramework="net461" />
  <package id="SendGridClient" version="2.0.0-preview2" targetFramework="net461" />

1 个答案:

答案 0 :(得分:0)

遵循https://www.nuget.org/packages/Sendgrid/中描述的步骤 这将确保您已参考发送网格dll。