我正在嘗試編寫一個(gè)將使用Sendgrid發(fā)送電子郵件的天藍(lán)色函數(shù)。但是,我無法獲得識別外部nuget包的功能。這是我所擁有的:project.json{"frameworks": { "net46": { "dependencies": { "SendGrid": "9.9.0" } } }}run.csx:using System;using Sendgrid;public static void Run(TimerInfo myTimer, TraceWriter log){ var client = new SendGridClient("xxx"); var fromAddr = new EmailAddress("xxx@xxx.com", "xxx"); var toAddr = new EmailAddress("xxxx", "xxx); var msg = MailHelper.CreateSingleEmail(fromAddr, toAddr, "subject", "content", "content"); client.SendEmailAsync(msg).Wait();}我收到此錯(cuò)誤:[Error] run.csx(8,7): error CS0246: The type or namespace name 'Sendgrid' could not be found (are you missing a using directive or an assembly reference?)我想念什么?
- 1 回答
- 0 關(guān)注
- 146 瀏覽
添加回答
舉報(bào)
0/150
提交
取消