From 70de608a5ae6b8cbf1abdcd688f95d29105f876a Mon Sep 17 00:00:00 2001 From: "Ronny Carlansson (SparkVision)" Date: Sat, 27 Apr 2024 08:14:40 +0200 Subject: [PATCH 1/2] update to .NET 8.0 --- appveyor.yml | 4 ++-- src/ScmBackup.Tests.Integration/DirectoryHelper.cs | 2 +- .../ScmBackup.Tests.Integration.csproj | 2 +- src/ScmBackup.Tests/ScmBackup.Tests.csproj | 2 +- src/ScmBackup/Http/MailKitEmailSender.cs | 4 ++-- src/ScmBackup/ScmBackup.csproj | 14 +++++++------- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3de6981..e57490e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: "{build}" -image: Visual Studio 2019 +image: Visual Studio 2022 install: - ps: C:\projects\scm-backup\version-number.ps1 build_script: @@ -8,7 +8,7 @@ test: off artifacts: - path: release\scm-backup-*.zip name: Application -- path: src\ScmBackup.Tests.Integration\bin\Release\netcoreapp3.1\*.log +- path: src\ScmBackup.Tests.Integration\bin\Release\net8.0\*.log name: Integration Test Logfile assembly_info: patch: true diff --git a/src/ScmBackup.Tests.Integration/DirectoryHelper.cs b/src/ScmBackup.Tests.Integration/DirectoryHelper.cs index 0f19d21..c66eca6 100644 --- a/src/ScmBackup.Tests.Integration/DirectoryHelper.cs +++ b/src/ScmBackup.Tests.Integration/DirectoryHelper.cs @@ -41,7 +41,7 @@ public static string CreateTempDirectory(string suffix) /// public static string TestAssemblyDirectory() { - string unc = typeof(DirectoryHelper).GetTypeInfo().Assembly.CodeBase; + string unc = typeof(DirectoryHelper).GetTypeInfo().Assembly.Location; // convert from UNC path to "real" path var uri = new Uri(unc); diff --git a/src/ScmBackup.Tests.Integration/ScmBackup.Tests.Integration.csproj b/src/ScmBackup.Tests.Integration/ScmBackup.Tests.Integration.csproj index a3ed3a0..737fd12 100644 --- a/src/ScmBackup.Tests.Integration/ScmBackup.Tests.Integration.csproj +++ b/src/ScmBackup.Tests.Integration/ScmBackup.Tests.Integration.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net8.0 ScmBackup.Tests.Integration ScmBackup.Tests.Integration true diff --git a/src/ScmBackup.Tests/ScmBackup.Tests.csproj b/src/ScmBackup.Tests/ScmBackup.Tests.csproj index a1200f8..42fc8b1 100644 --- a/src/ScmBackup.Tests/ScmBackup.Tests.csproj +++ b/src/ScmBackup.Tests/ScmBackup.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net8.0 ScmBackup.Tests ScmBackup.Tests true diff --git a/src/ScmBackup/Http/MailKitEmailSender.cs b/src/ScmBackup/Http/MailKitEmailSender.cs index 548a368..28681cf 100644 --- a/src/ScmBackup/Http/MailKitEmailSender.cs +++ b/src/ScmBackup/Http/MailKitEmailSender.cs @@ -22,10 +22,10 @@ public void Send(string subject, string body) } var message = new MimeMessage(); - message.From.Add(new MailboxAddress(config.From)); + message.From.Add(new MailboxAddress("", config.From)); foreach (var to in config.To_AsList()) { - message.To.Add(new MailboxAddress(to)); + message.To.Add(new MailboxAddress("", to)); } message.Subject = subject; diff --git a/src/ScmBackup/ScmBackup.csproj b/src/ScmBackup/ScmBackup.csproj index ba0ac95..ab2d312 100644 --- a/src/ScmBackup/ScmBackup.csproj +++ b/src/ScmBackup/ScmBackup.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net8.0 ScmBackup Exe ScmBackup @@ -26,12 +26,12 @@ - - - - - - + + + + + + From 6154bf4bfe6e1e77f40face9eeb2509f0f433ba2 Mon Sep 17 00:00:00 2001 From: "Ronny Carlansson (SparkVision)" Date: Thu, 2 May 2024 14:31:39 +0200 Subject: [PATCH 2/2] Update github workflows to net8.0 --- .github/workflows/ci-linux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 9676614..d076d01 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -12,7 +12,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 3.1.x + dotnet-version: 8.0.x - name: Set version number run: .\version-number.ps1 shell: pwsh @@ -38,4 +38,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: Test log - path: src/ScmBackup.Tests.Integration/bin/Release/netcoreapp3.1/*.log + path: src/ScmBackup.Tests.Integration/bin/Release/net8.0/*.log