Skip to content

Commit

Permalink
Updated to .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Ribeiro committed Feb 27, 2024
1 parent b44e89b commit 2087372
Show file tree
Hide file tree
Showing 17 changed files with 114 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<RepositoryUrl>https://github.com/marcoatribeiro/FluentEmailer</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>fluentemailer_logo_64x64.png</PackageIcon>
<Version>1.0.0-rc1</Version>
<Version>1.0.0-rc2</Version>

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
Expand Down
8 changes: 6 additions & 2 deletions Src/FluentEmailer.Core/FluentEmailer.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
Expand All @@ -14,7 +14,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
10 changes: 7 additions & 3 deletions Src/Renderers/FluentEmailer.Liquid/FluentEmailer.Liquid.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Generate emails using Liquid templates. Uses the Fluid project under the hood.</Description>
<PackageTags>$(PackageTags);liquid</PackageTags>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Fluid.Core" Version="2.4.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Fluid.Core" Version="2.5.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion Src/Renderers/FluentEmailer.Razor/FluentEmailer.Razor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Generate emails using Razor templates. Anything you can do in ASP.NET is possible here. Uses the RazorLight project under the hood.</Description>
Expand All @@ -16,4 +16,8 @@
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Send emails via MailKit. The SmtpClient has been deprecated and Microsoft recommends using MailKit instead.</Description>
Expand All @@ -10,11 +10,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MailKit" Version="4.1.0" />
<PackageReference Include="MailKit" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Send emails via MailerSend using their REST API</Description>
Expand All @@ -12,4 +12,8 @@
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Send emails via MailGun using their REST API</Description>
Expand All @@ -12,4 +12,8 @@
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Authors>Luke Lowrey;Ben Cull;Anthony Zigenbine;Github Contributors</Authors>
Expand All @@ -13,4 +13,8 @@
<ProjectReference Include="..\FluentEmailer.Smtp\FluentEmailer.Smtp.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Send emails via SendGrid using their REST API</Description>
Expand All @@ -16,4 +16,8 @@
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion Src/Senders/FluentEmailer.Smtp/FluentEmailer.Smtp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Send emails via SMTP with a Fluent API.</Description>
Expand All @@ -12,4 +12,8 @@
<ProjectReference Include="..\..\FluentEmailer.Core\FluentEmailer.Core.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
18 changes: 16 additions & 2 deletions Tests/FluentEmailer.Core.Tests/FluentEmailer.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="netDumbster" Version="3.0.1" />
<PackageReference Include="WireMock.Net" Version="1.5.34" />
<PackageReference Include="WireMock.Net" Version="1.5.48" />
</ItemGroup>

<ItemGroup>
Expand All @@ -29,4 +29,18 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Update="coverlet.collector" Version="6.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FluentAssertions" Version="6.12.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Tests/FluentEmailer.Core.Tests/MailerSendSenderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task Should_Send_Email()
.Body("<html><body><h1>Test</h1><p>Greetings from the team, you got this message through MailerSend.</p></body></html>", true)
.Tag("test_tag")
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand Down
14 changes: 7 additions & 7 deletions Tests/FluentEmailer.Core.Tests/MailgunSenderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task Should_Send_Email_With_Tag()
.Body("<html><body><h1>Test</h1><p>Greetings from the team, you got this message through SendGrid.</p></body></html>", true)
.Tag(_fixture.Tag)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -43,7 +43,7 @@ public async Task Should_Send_Email_With_ReplyTo()
.ReplyTo(_fixture.ToEmail, _fixture.ToName)
.Body(_fixture.Body)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -69,7 +69,7 @@ public async Task Should_Send_Email_With_Attachments()
.Body(_fixture.Body)
.Attach(attachment)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -92,7 +92,7 @@ public async Task Should_Send_Email_With_Inline_Attachments()
"<p>You should see an image without an attachment, or without a download prompt, depending on the email client.</p></html>", true)
.Attach(attachment)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -104,7 +104,7 @@ public async Task Should_Send_Email_With_Variables()
.Body(_fixture.Body)
.Header("X-Mailgun-Variables", JsonSerializer.Serialize(new Variable { Var1 = "Test" }))
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -116,7 +116,7 @@ public async Task Should_Send_High_Priority_Email()
.Body(_fixture.Body)
.HighPriority()
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -128,7 +128,7 @@ public async Task Should_Send_Low_Priority_Email()
.Body(_fixture.Body)
.LowPriority()
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand Down
14 changes: 7 additions & 7 deletions Tests/FluentEmailer.Core.Tests/SendGridSenderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task Should_Send_Email_With_Tag()
.Body("<html><body><h1>Test</h1><p>Greetings from the team, you got this message through SendGrid.</p></body></html>", true)
.Tag(_fixture.Tag)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -47,7 +47,7 @@ public async Task Should_Send_Email_Using_Template()

var response = await _testEmail
.SendWithTemplateAsync(templateId, templateData)
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -59,7 +59,7 @@ public async Task Should_Send_Email_With_ReplyTo()
.ReplyTo(_fixture.ToEmail, _fixture.ToName)
.Body(_fixture.Body)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -80,7 +80,7 @@ public async Task Should_Send_Email_With_Attachments()
.Body(_fixture.Body)
.Attach(attachment)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -103,7 +103,7 @@ public async Task Should_Send_Email_With_Inline_Attachments()
.Body(_fixture.Body)
.Attach(attachment)
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -115,7 +115,7 @@ public async Task Should_Send_High_Priority_Email()
.Body(_fixture.Body)
.HighPriority()
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand All @@ -127,7 +127,7 @@ public async Task Should_Send_Low_Priority_Email()
.Body(_fixture.Body)
.LowPriority()
.SendAsync()
.ConfigureAwait(false);
.ConfigureAwait(true);

response.ShouldBeSuccessful();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.10" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -19,4 +19,18 @@
<EmbeddedResource Include="EmailTemplates\_embedded.liquid" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="coverlet.collector" Version="6.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="FluentAssertions" Version="6.12.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="xunit" Version="2.7.0" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Loading

0 comments on commit 2087372

Please sign in to comment.