diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index ea5289a2..43794321 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [windows-latest, macos-latest, ubuntu-latest] steps: - - uses: actions/checkout@v4.2.1 + - uses: actions/checkout@v4.2.2 - uses: nuget/setup-nuget@v2 with: nuget-api-key: ${{secrets.NUGET_API_KEY}} @@ -23,13 +23,14 @@ jobs: uses: microsoft/setup-msbuild@v2.0.0 if: matrix.os == 'windows-latest' - - name: Setup .NET 6.0, 7.0, 8.0 for tests - uses: actions/setup-dotnet@v4.0.1 + - name: Setup .NET 6.0, 7.0, 8.0, 9.0 for tests + uses: actions/setup-dotnet@v4.1.0 with: dotnet-version: | 6.0.x 7.0.x 8.0.x + 9.0.x - name: Run NetSparkle.Tests in .NET 4.6.2 run: dotnet test -f net462 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj @@ -53,12 +54,18 @@ jobs: - name: Run NetSparkle.Tests.AppCastGenerator in .NET 8 run: dotnet test -f net8.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj + - name: Run NetSparkle.Tests in .NET 9 + run: dotnet test -f net9.0 ${{ github.workspace }}/src/NetSparkle.Tests/NetSparkle.Tests.csproj + + - name: Run NetSparkle.Tests.AppCastGenerator in .NET 9 + run: dotnet test -f net9.0 ${{ github.workspace }}/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj + build: name: Build all packages as smoke test runs-on: windows-latest needs: test steps: - - uses: actions/checkout@v4.2.1 + - uses: actions/checkout@v4.2.2 - uses: nuget/setup-nuget@v2 with: nuget-api-key: ${{secrets.NUGET_API_KEY}} @@ -67,13 +74,14 @@ jobs: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2.0.0 - - name: Setup .NET 6.0, 7.0, 8.0 - uses: actions/setup-dotnet@v4.0.1 + - name: Setup .NET 6.0, 7.0, 8.0, 9.0 + uses: actions/setup-dotnet@v4.1.0 with: dotnet-version: | 6.0.x 7.0.x 8.0.x + 9.0.x - name: Clean things to be safe run: | @@ -104,7 +112,7 @@ jobs: needs: build if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/avalonia-preview' || github.ref == 'refs/heads/versions/2.x' steps: - - uses: actions/checkout@v4.2.1 + - uses: actions/checkout@v4.2.2 - uses: nuget/setup-nuget@v2 with: nuget-api-key: ${{secrets.NUGET_API_KEY}} @@ -113,13 +121,14 @@ jobs: - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2.0.0 - - name: Setup .NET 6.0, 7.0, 8.0 - uses: actions/setup-dotnet@v4.0.1 + - name: Setup .NET 6.0, 7.0, 8.0, 9.0 + uses: actions/setup-dotnet@v4.1.0 with: dotnet-version: | 6.0.x 7.0.x 8.0.x + 9.0.x - name: Publish NetSparkleUpdater.SparkleUpdater on version change uses: nitz/publish-nuget@60fd3adf9d9eecc3bbf8a98738734d3061347172 diff --git a/README.md b/README.md index 1eb38212..67c27b9b 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ The file that launches your downloaded update executable only waits for 90 secon * Subclassing `JSONConfiguration` lets you quickly change the file path where data is saved via `GetSavePath` * Subclass `AppCastHelper` if you want full control over the app cast downloading and parsing process. Note that you can probably do everything you need to do via the `AppCastHelper` properties (including `IAppCastFilter AppCastFilter`), but subclassing will give you full, absolute control over the whole process. To use the instance of your class, set `SparkleUpdater.AppCastHelper`. * Subclass `ReleaseNotesGrabber` to control the release notes downloading (and therefore display) process. To use an instance of your class, set `UIFactory.ReleaseNotesGrabberOverride`. -* Override `WebFileDownloader` if you don't want to implement `IUpdateDownloader` yourself and just want to override a function or two such as `CreateHttpClient`. To use an instance of your class, set `SparkleUpdater.UpdateDownloader`. +* Override `WebFileDownloader` if you don't want to implement `IUpdateDownloader` yourself and just want to override a function or two such as `CreateHttpClient` or `RetreiveDestinationFileNameAsync`. To use an instance of your class, set `SparkleUpdater.UpdateDownloader`. * Override `WebRequestAppCastDataDownloader` if you don't want to implement `IAppCastDataDownloader` and just want to override a function or two such as `CreateHttpClient`. To use an instance of your class, set `SparkleUpdater.AppCastDataDownloader`. * Override `LogWriter` to implement the `PrintMessage` function; because `ILogger` is a pretty simple interface, you can probably just implement that interface yourself if your needs are complex. To use an instance of your class, set `SparkleUpdater.LogWriter`. * Override `SparkleUpdater` to implement some different installation-related functions, including: diff --git a/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj b/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj index 94ee9d82..2df5e6d2 100644 --- a/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj +++ b/src/NetSparkle.Tests.AppCastGenerator/NetSparkle.Tests.AppCastGenerator.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 false true diff --git a/src/NetSparkle.Tests/NetSparkle.Tests.csproj b/src/NetSparkle.Tests/NetSparkle.Tests.csproj index 7e0945c3..ebca48d1 100644 --- a/src/NetSparkle.Tests/NetSparkle.Tests.csproj +++ b/src/NetSparkle.Tests/NetSparkle.Tests.csproj @@ -3,7 +3,7 @@ {E50AC3A5-6C63-40D7-A4C4-9B359EFD5707} NetSparkleUnitTests NetSparkleUnitTests - net8.0;net7.0;net6.0;net462 + net9.0;net8.0;net7.0;net6.0;net462 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages diff --git a/src/NetSparkle.Tests/SparkleUpdaterFixture.cs b/src/NetSparkle.Tests/SparkleUpdaterFixture.cs index ce3ed654..83b6ad6d 100644 --- a/src/NetSparkle.Tests/SparkleUpdaterFixture.cs +++ b/src/NetSparkle.Tests/SparkleUpdaterFixture.cs @@ -4,7 +4,7 @@ using NetSparkleUpdater.AppCastHandlers; using NetSparkleUpdater.Interfaces; using Xunit; -#if (NETSTANDARD || NET5 || NET6 || NET7 || NET8) +#if (NETSTANDARD || NET5 || NET6 || NET7 || NET8 || NET9) using System.Runtime.InteropServices; #endif diff --git a/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj b/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj index ec8bdea4..68c9d87a 100644 --- a/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj +++ b/src/NetSparkle.Tools.AppCastGenerator/NetSparkle.Tools.AppCastGenerator.csproj @@ -4,7 +4,7 @@ Exe NetSparkleUpdater.AppCastGenerator NetSparkleUpdater.Tools.AppCastGenerator - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 true publish\ true diff --git a/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj b/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj index 033a9ffe..2b76e423 100644 --- a/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj +++ b/src/NetSparkle.Tools.DSAHelper/NetSparkle.Tools.DSAHelper.csproj @@ -5,7 +5,7 @@ Exe NetSparkleUpdater.DSAHelper NetSparkleUpdater.Tools.DSAHelper - net8.0;net7.0;net6.0 + net9.0;net8.0;net7.0;net6.0 NetSparkle NetSparkleUpdater.Tools.DSAHelper Command line tool 'netsparkle-dsa' to generate and use DSA signatures. WARNING: DSA signatures are insecure. If possible, please use NetSparkleUpdater.Tools.AppCastGenerator instead to use ed25519 signatures. Use in conjunction with the NetSparkleUpdater library. diff --git a/src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.csproj b/src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.csproj index 7ce92a79..7576a5c2 100644 --- a/src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.csproj +++ b/src/NetSparkle.UI.Avalonia/NetSparkle.UI.Avalonia.csproj @@ -1,7 +1,7 @@ - net8.0;net7.0;net6.0;netstandard2.0 + net9.0;net8.0;net7.0;net6.0;netstandard2.0 true NetSparkleUpdater.UI.Avalonia 3.0.0-preview20241016001 diff --git a/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj b/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj index 31046d72..eb804295 100644 --- a/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj +++ b/src/NetSparkle.UI.WPF/NetSparkle.UI.WPF.csproj @@ -2,7 +2,7 @@ {6915843C-7947-4268-B569-6F5684651DF4} true - net8.0-windows;net7.0-windows;net6.0-windows;net462 + net9.0-windows;net8.0-windows;net7.0-windows;net6.0-windows;net462 NetSparkleUpdater.UI.WPF NetSparkleUpdater.UI.WPF Copyright © 2024 @@ -52,13 +52,16 @@ - + - + - + + + + diff --git a/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj b/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj index 9bb16d4b..19eec54d 100644 --- a/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj +++ b/src/NetSparkle.UI.WinForms/NetSparkle.UI.WinForms.csproj @@ -4,7 +4,7 @@ NetSparkleUpdater.UI.WinForms NetSparkleUpdater.UI.WinForms true - net8.0-windows;net7.0-windows;net6.0-windows;net462 + net9.0-windows;net8.0-windows;net7.0-windows;net6.0-windows;net462 NetSparkle.NetFramework.WinForms NetSparkleUpdater.UI.WinForms Copyright © 2024 @@ -95,14 +95,17 @@ true - + - + - + + + + diff --git a/src/NetSparkle.UI.WinForms/ToastNotifier.cs b/src/NetSparkle.UI.WinForms/ToastNotifier.cs index 7043a568..5a935fb4 100644 --- a/src/NetSparkle.UI.WinForms/ToastNotifier.cs +++ b/src/NetSparkle.UI.WinForms/ToastNotifier.cs @@ -1,6 +1,7 @@ using NetSparkleUpdater.Properties; using System; using System.Collections.Generic; +using System.ComponentModel; using System.Drawing; using System.Windows.Forms; @@ -49,6 +50,7 @@ public ToastNotifier(Icon? applicationIcon = null) /// /// Action to perform when the user clicks on the toast window /// + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public Action ClickAction { get; set; } private void PauseTimerTick(object? sender, EventArgs e) diff --git a/src/NetSparkle.UI.WinForms/UpdateAvailableWindow.cs b/src/NetSparkle.UI.WinForms/UpdateAvailableWindow.cs index 99dfa755..d7eb0e1c 100644 --- a/src/NetSparkle.UI.WinForms/UpdateAvailableWindow.cs +++ b/src/NetSparkle.UI.WinForms/UpdateAvailableWindow.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using NetSparkleUpdater.Events; using NetSparkleUpdater.AppCastHandlers; +using System.ComponentModel; namespace NetSparkleUpdater.UI.WinForms { @@ -40,6 +41,7 @@ public partial class UpdateAvailableWindow : Form, IUpdateAvailable /// /// Object responsible for downloading and formatting markdown release notes for display in HTML /// + [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] public ReleaseNotesGrabber? ReleaseNotesGrabber { get; set; } private ISignatureVerifier? _signatureVerifier; diff --git a/src/NetSparkle/Configurations/RegistryConfiguration.cs b/src/NetSparkle/Configurations/RegistryConfiguration.cs index f8d97f64..29bc0dec 100644 --- a/src/NetSparkle/Configurations/RegistryConfiguration.cs +++ b/src/NetSparkle/Configurations/RegistryConfiguration.cs @@ -2,7 +2,7 @@ using System.Globalization; using Microsoft.Win32; using NetSparkleUpdater.Interfaces; -#if (NETSTANDARD || NET6 || NET7 || NET8) +#if (NETSTANDARD || NET6 || NET7 || NET8 || NET9) using System.Runtime.InteropServices; #endif @@ -134,7 +134,7 @@ private DateTime ConvertStringToDate(string str) /// true if the items were loaded successfully; false otherwise private bool LoadValuesFromPath(string regPath) { -#if (NETSTANDARD || NET6 || NET7 || NET8) +#if (NETSTANDARD || NET6 || NET7 || NET8 || NET9) if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return false; @@ -206,7 +206,7 @@ private void SaveDidRunOnceAsTrue(string regPath) /// true if the values were saved to the registry; false otherwise private bool SaveValuesToPath(string regPath) { -#if (NETSTANDARD || NET6 || NET7 || NET8) +#if (NETSTANDARD || NET6 || NET7 || NET8 || NET9) if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return false; diff --git a/src/NetSparkle/NetSparkle.csproj b/src/NetSparkle/NetSparkle.csproj index 1cb47d59..31b6d748 100644 --- a/src/NetSparkle/NetSparkle.csproj +++ b/src/NetSparkle/NetSparkle.csproj @@ -1,7 +1,7 @@  - net8.0;net7.0;net6.0;netstandard2.0;net462 + net9.0;net8.0;net7.0;net6.0;netstandard2.0;net462 true NetSparkleUpdater.SparkleUpdater 3.0.0-preview20241016001 @@ -82,6 +82,16 @@ ..\bin\Debug\NetSparkle\NetSparkle.xml DEBUG;TRACE;NETCORE;NET8 + + ..\bin\Release\NetSparkle\ + ..\bin\Release\NetSparkle\NetSparkle.xml + TRACE;NETCORE;NET9 + + + ..\bin\Debug\NetSparkle\ + ..\bin\Debug\NetSparkle\NetSparkle.xml + DEBUG;TRACE;NETCORE;NET9 + diff --git a/src/NetSparkle/SparkleUpdater.cs b/src/NetSparkle/SparkleUpdater.cs index e88101a0..6fa2d18f 100644 --- a/src/NetSparkle/SparkleUpdater.cs +++ b/src/NetSparkle/SparkleUpdater.cs @@ -14,7 +14,7 @@ using NetSparkleUpdater.AppCastHandlers; using NetSparkleUpdater.AssemblyAccessors; using System.Text; -#if NETSTANDARD || NET6 || NET7 || NET8 +#if NETSTANDARD || NET6 || NET7 || NET8 || NET9 using System.Runtime.InteropServices; #endif @@ -274,7 +274,7 @@ public Configuration Configuration { if (_configuration == null) { -#if NETSTANDARD || NET6 || NET7 || NET8 +#if NETSTANDARD || NET6 || NET7 || NET8 || NET9 if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _configuration = new RegistryConfiguration(new AssemblyDiagnosticsAccessor(_appReferenceAssembly));