Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
FROM mono:latest

ENV FrameworkPathOverride /usr/lib/mono/4.5/

RUN apt-get update \
&& apt-get install -y curl make apt-transport-https

RUN curl -sSL https://packages.microsoft.com/config/ubuntu/19.10/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \
&& dpkg --install packages-microsoft-prod.deb
FROM mcr.microsoft.com/dotnet/sdk:8.0

RUN apt-get update \
&& apt-get install -y dotnet-sdk-2.1
&& apt-get install -y curl make ca-certificates

COPY prism/prism/nginx/cert.crt /usr/local/share/ca-certificates/cert.crt
RUN update-ca-certificates
Expand Down
2 changes: 1 addition & 1 deletion ExampleCoreProject/ExampleCoreProject.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion ExampleNet45Project/ExampleNet45.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net452</TargetFramework>
<TargetFramework>net462</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ We appreciate your continued support, thank you!

## Prerequisites

- .NET Framework 4.0+
- .NET Core 1.0+
- .NET Standard 1.3+
- .NET Framework 4.6.2+
- .NET 8+
- .NET Standard 2.0+
- A Twilio SendGrid account, [sign up for free](https://sendgrid.com/free?source=sendgrid-csharp) to send up to 40,000 emails for the first 30 days, then send 100 emails/day free forever or check out [our pricing](https://sendgrid.com/pricing?source=sendgrid-csharp).

<a name="obtain-api"></a>
Expand Down Expand Up @@ -97,7 +97,7 @@ dotnet add package SendGrid.Extensions.DependencyInjection
```

Once you have the Twilio SendGrid library installed, you can include calls to it in your code.
For sample implementations, see the [.NET Core Example](ExampleCoreProject) and the [.NET 4.5.2 Example](ExampleNet45Project) folders.
For sample implementations, see the [.NET Core Example](ExampleCoreProject) and the [.NET Framework 4.6.2 Example](ExampleNet45Project) folders.

## Dependencies

Expand Down Expand Up @@ -254,7 +254,7 @@ services.AddSendGrid(options =>
- [Twilio SendGrid Docs](https://docs.sendgrid.com/api-reference/)
- [Library Usage Docs](USAGE.md)
- [Example Code - .NET Core](ExampleCoreProject)
- [Example Code - .NET 4.5.2+](ExampleNet45Project)
- [Example Code - .NET Framework 4.6.2+](ExampleNet45Project)
- [How-to: Migration from v2 to v3](https://sendgrid.com/docs/Classroom/Send/v3_Mail_Send/how_to_migrate_from_v2_to_v3_mail_send.html)
- [v3 Web API Mail Send Helper](src/SendGrid/Helpers/Mail)

Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
15 changes: 5 additions & 10 deletions src/SendGrid/SendGrid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<VersionPrefix>9.29.3</VersionPrefix>
<TargetFrameworks>netstandard1.3;netstandard2.0;net452;net40</TargetFrameworks>
<TargetFrameworks>net8.0;netstandard2.0;net462</TargetFrameworks>
<PlatformTarget>anycpu</PlatformTarget>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<OutputType>Library</OutputType>
<AssemblyOriginatorKeyFile>../../tools/sendgrid-csharp.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<DebugSymbols Condition=" '$(TargetFramework)' == 'net452' ">true</DebugSymbols>
<DebugType Condition=" '$(TargetFramework)' == 'net452' ">full</DebugType>
<DebugSymbols Condition=" '$(TargetFramework)' == 'net462' ">true</DebugSymbols>
<DebugType Condition=" '$(TargetFramework)' == 'net462' ">full</DebugType>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb;.xml</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

Expand All @@ -23,7 +23,7 @@
<RepositoryUrl>https://github.com/sendgrid/sendgrid-csharp.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageIconUrl>https://sendgrid.com/wp-content/themes/sgdotcom/pages/resource/brand//2016/SendGrid-Logomark.png</PackageIconUrl>
<PackageDescription>C# client library and examples for using Twilio SendGrid API's to send mail and access Web API v3 endpoints with .NET Standard 1.3 and .NET Core support.</PackageDescription>
<PackageDescription>C# client library and examples for using Twilio SendGrid API's to send mail and access Web API v3 endpoints with .NET 8, .NET Standard 2.0 and .NET Framework 4.6.2 support.</PackageDescription>
<PackageReleaseNotes>Please see: https://github.com/sendgrid/sendgrid-csharp/releases</PackageReleaseNotes>
<PackageTags>Twilio;SendGrid;Email;Mail;Microsoft;Azure;Transactional;.NET Core</PackageTags>
<Copyright>Twilio SendGrid, Inc. 2020</Copyright>
Expand All @@ -49,16 +49,11 @@
<PackageReference Include="starkbank-ecdsa" Version="[1.3.3, 2.0.0)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System.Net.Http" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
<PackageReference Include="Microsoft.Bcl.Async" Version="1.0.168" />
<PackageReference Include="Microsoft.Net.Http" Version="2.2.29" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/SendGrid.Tests/SendGrid.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down