diff --git a/src/NetSparkle.Tests/SparkleUpdaterFixture.cs b/src/NetSparkle.Tests/SparkleUpdaterFixture.cs index ad8e5fe9..67208d4b 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) +#if (NETSTANDARD || NET5 || NET6 || NET7 || NET8) using System.Runtime.InteropServices; #endif diff --git a/src/NetSparkle/Configurations/JSONConfiguration.cs b/src/NetSparkle/Configurations/JSONConfiguration.cs index 70665256..7f1c51f6 100644 --- a/src/NetSparkle/Configurations/JSONConfiguration.cs +++ b/src/NetSparkle/Configurations/JSONConfiguration.cs @@ -8,7 +8,7 @@ using System.Globalization; using System.IO; using System.Text; -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) using System.Text.Json; #endif @@ -138,7 +138,7 @@ private bool LoadValuesFromPath(string saveLocation) try { string json = File.ReadAllText(saveLocation); -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) var data = JsonSerializer.Deserialize(json); #else var data = JsonConvert.DeserializeObject(json); @@ -201,7 +201,7 @@ private bool SaveValuesToPath(string savePath) }; LastConfigUpdate = savedConfig.LastConfigUpdate; -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) string json = JsonSerializer.Serialize(savedConfig); #else string json = JsonConvert.SerializeObject(savedConfig); diff --git a/src/NetSparkle/Configurations/RegistryConfiguration.cs b/src/NetSparkle/Configurations/RegistryConfiguration.cs index e3cfb1a7..bb43b40a 100644 --- a/src/NetSparkle/Configurations/RegistryConfiguration.cs +++ b/src/NetSparkle/Configurations/RegistryConfiguration.cs @@ -3,7 +3,7 @@ using Microsoft.Win32; using NetSparkleUpdater.AssemblyAccessors; using NetSparkleUpdater.Interfaces; -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) using System.Runtime.InteropServices; #endif @@ -140,7 +140,7 @@ private DateTime ConvertStringToDate(string str) /// true if the items were loaded successfully; false otherwise private bool LoadValuesFromPath(string regPath) { -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return false; @@ -212,7 +212,7 @@ private void SaveDidRunOnceAsTrue(string regPath) /// true if the values were saved to the registry; false otherwise private bool SaveValuesToPath(string regPath) { -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { return false; diff --git a/src/NetSparkle/NetSparkle.csproj b/src/NetSparkle/NetSparkle.csproj index 3f2457a5..44bc8eaf 100644 --- a/src/NetSparkle/NetSparkle.csproj +++ b/src/NetSparkle/NetSparkle.csproj @@ -87,12 +87,12 @@ ..\bin\Release\NetSparkle\ ..\bin\Release\NetSparkle\NetSparkle.xml - TRACE;NETCORE;NET7 + TRACE;NETCORE;NET8 ..\bin\Debug\NetSparkle\ ..\bin\Debug\NetSparkle\NetSparkle.xml - DEBUG;TRACE;NETCORE;NET7 + DEBUG;TRACE;NETCORE;NET8 diff --git a/src/NetSparkle/SparkleUpdater.cs b/src/NetSparkle/SparkleUpdater.cs index ba7a6ab0..71e9e0dc 100644 --- a/src/NetSparkle/SparkleUpdater.cs +++ b/src/NetSparkle/SparkleUpdater.cs @@ -19,7 +19,7 @@ using NetSparkleUpdater.AssemblyAccessors; using System.Text; using System.Globalization; -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) using System.Runtime.InteropServices; #endif @@ -248,7 +248,7 @@ public Configuration Configuration { if (_configuration == null) { -#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7) +#if (NETSTANDARD || NET31 || NET5 || NET6 || NET7 || NET8) if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { _configuration = new RegistryConfiguration(new AssemblyReflectionAccessor(_appReferenceAssembly));