Skip to content

Commit

Permalink
Update to .net8
Browse files Browse the repository at this point in the history
  • Loading branch information
rnwood committed Feb 22, 2024
1 parent 6ab4829 commit 514e7a3
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 60 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0.5 AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0 AS runtime
COPY out /app
VOLUME ["/smtp4dev"]
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.linux.arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:6.0.5 AS runtime
FROM --platform=linux/arm64 mcr.microsoft.com/dotnet/aspnet:8.0.0 AS runtime
COPY out /app
VOLUME ["/smtp4dev"]
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# escape=`
FROM mcr.microsoft.com/dotnet/aspnet:6.0.5 AS final
FROM mcr.microsoft.com/dotnet/aspnet:8.0.0 AS final
COPY out /app
EXPOSE 80
EXPOSE 25
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A dummy SMTP server for Windows, Linux, Mac OS-X (and maybe elsewhere where .NET Core is available). Lets you test your application without spamming your real customers and without needing to set up a complicated real email server with a special configuration. Messages received in smtp4dev can be viewed and inspected.

*If you're looking for the older v2 Windows GUI version. [Grab it here](https://github.com/rnwood/smtp4dev/releases/tag/v2.0.10).*
*If you're looking for the older v2 Windows only GUI version. [Grab it here](https://github.com/rnwood/smtp4dev/releases/tag/v2.0.10).*

> <a style="float: right" href="https://www.patreon.com/bePatron?u=38204828" data-patreon-widget-type="become-patron-button"><img alt='Become a Patreon' src='https://c5.patreon.com/external/logo/become_a_patron_button.png' height="30px"></a> <a style="float: right" href='https://www.paypal.me/rnwood'><img alt='Donate' src='https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_pp_142x27.png'/></a> *If you find smtp4dev useful, please consider supporting further development by making a donation*
> .
Expand Down
6 changes: 3 additions & 3 deletions Rnwood.Smtp4dev.Desktop/Rnwood.Smtp4dev.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ApplicationIcon>app\icon.ico</ApplicationIcon>
</PropertyGroup>

Expand All @@ -21,8 +21,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="ParallelExtensionsExtras.NetFxStandard" Version="1.4.0" />
<PackageReference Include="Photino.NET" Version="2.1.11" />
<PackageReference Include="ParallelExtensionsExtras.NetFxStandard" Version="2.0.0" />
<PackageReference Include="Photino.NET" Version="2.5.2" />
</ItemGroup>

<ItemGroup>
Expand Down
26 changes: 13 additions & 13 deletions Rnwood.Smtp4dev.Tests/Rnwood.Smtp4dev.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand All @@ -24,19 +24,19 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.6.0" />
<PackageReference Include="MailKit" Version="3.3.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="MedallionShell" Version="1.6.2" />
<PackageReference Include="NSubstitute" Version="4.4.0" />
<PackageReference Include="ReflectionMagic" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Selenium.Support" Version="4.2.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.2.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.20" />
<PackageReference Include="WebDriverManager" Version="2.13.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="ReflectionMagic" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Selenium.Support" Version="4.16.2" />
<PackageReference Include="Selenium.WebDriver" Version="4.16.2" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.7" />
<PackageReference Include="WebDriverManager" Version="2.17.1" />
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
126 changes: 122 additions & 4 deletions Rnwood.Smtp4dev/ClientApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions Rnwood.Smtp4dev/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@
"private": true,
"scripts": {
"postinstall": "patch-package",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:dev": "vue-cli-service build --mode development",
"serve": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
"build": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build",
"build:dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build --mode development",
"lint": "vue-cli-service lint",
"test": "jest"
},
"devDependencies": {
"@microsoft/signalr": "^6.0.6",
"@babel/preset-typescript": "^7.18.6",
"@fortawesome/fontawesome-free": "^5.15.4",
"@fortawesome/fontawesome-svg-core": "^6.1.1",
"@fortawesome/free-solid-svg-icons": "^6.1.1",
"@fortawesome/vue-fontawesome": "^2.0.8",
"@microsoft/signalr": "^6.0.6",
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/vue": "^5.8.2",
"@types/jest": "^27.0.2",
"@types/sanitize-html": "^2.6.2",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.31.2",
"@vue/cli-plugin-babel": "^4.5.15",
Expand All @@ -46,6 +47,7 @@
"locale-index-of": "^3.1.0",
"moment": "^2.29.3",
"patch-package": "^6.4.7",
"sanitize-html": "^2.7.1",
"sass": "^1.51.0",
"sass-loader": "^10.2.1",
"splitpanes": "^2.4.1",
Expand All @@ -59,10 +61,7 @@
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.4",
"vue-template-compiler": "^2.6.14",
"vue2-ace-editor": "^0.0.15",
"sanitize-html": "^2.7.1",
"@types/sanitize-html": "^2.6.2"

"vue2-ace-editor": "^0.0.15"
},
"eslintConfig": {
"root": true,
Expand Down Expand Up @@ -90,5 +89,8 @@
"browserslist": [
"> 1%",
"last 2 versions"
]
],
"dependencies": {
"cross-env": "^7.0.3"
}
}
4 changes: 0 additions & 4 deletions Rnwood.Smtp4dev/CommandLineOptionsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,5 @@ public CommandLineOptionsException(string message) : base(message)
public CommandLineOptionsException(string message, Exception innerException) : base(message, innerException)
{
}

protected CommandLineOptionsException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
38 changes: 18 additions & 20 deletions Rnwood.Smtp4dev/Rnwood.Smtp4dev.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<VersionPrefix>3.2.0-dev</VersionPrefix>
<TargetFramework>net8.0</TargetFramework>
<VersionPrefix>3.3.0-dev</VersionPrefix>
<TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
Expand All @@ -21,32 +21,30 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ardalis.GuardClauses" Version="4.0.1" />
<PackageReference Include="Ardalis.GuardClauses" Version="4.3.0" />
<PackageReference Include="CommandLiners.MonoOptions" Version="1.0.36" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.45" />
<PackageReference Include="MailKit" Version="3.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="6.0.10" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="6.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.10">
<PackageReference Include="HtmlAgilityPack" Version="1.11.57" />
<PackageReference Include="MailKit" Version="4.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.WindowsServices" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.10" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.0" />
<PackageReference Include="MimeKit" Version="3.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
<PackageReference Include="MimeKit" Version="4.3.0" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="Rnwood.LumiSoft.Net" Version="1.0.0" />
<PackageReference Include="Rnwood.SmtpServer" Version="3.1.0-ci0648" />
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
<PackageReference Include="Serilog" Version="2.11.0" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.EventLog" Version="3.1.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.20" />
<PackageReference Include="System.Reactive" Version="5.0.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.7" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="VueCliMiddleware" Version="6.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Rnwood.Smtp4dev/Server/SSCertGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static X509Certificate2 CreateSelfSignedCertificate(string hostname)
var cert = certGenerator.Generate(signatureFactory);


Pkcs12Store store = new Pkcs12Store();
Pkcs12Store store = new Pkcs12StoreBuilder().Build();
var certificateEntry = new X509CertificateEntry(cert);
store.SetCertificateEntry("cert", certificateEntry);
store.SetKeyEntry("cert", new AsymmetricKeyEntry(keyPair.Private), new[] { certificateEntry });
Expand Down
Loading

0 comments on commit 514e7a3

Please sign in to comment.