Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including SendGrid breaks compile

Tags:

.net

sendgrid

I've just downloaded SendGrid via Nuget and am trying to use it in one of my projects in a Solution.

I have the following references:

enter image description here

And referenced in my file:

enter image description here

And this code:

enter image description here

But I get the error "The type or namespace name 'SendGridMessage' could not be found (are you missing a using directive or assembly reference?)":

enter image description here

What's wrong with the above?

like image 270
Sean Avatar asked Jun 16 '14 10:06

Sean


1 Answers

SendGrid has now added a fork to nuget for .Net 4.0 support. If you want to keep using .Net 4.0 then you can install the SendGrid.Net40 package using the Visual Studio NuGet Console Manager with the following line:

Install-Package SendGrid.Net40

Here is the link to SendGrid that mentions that it has been forked: https://github.com/sendgrid/sendgrid-csharp/issues/112

and a link to the SendGrid.Net4.0 NuGet Gallery: https://www.nuget.org/packages/SendGrid.Net40/

like image 66
Gwasshoppa Avatar answered Oct 06 '22 11:10

Gwasshoppa