Skip to content

Commit

Permalink
Make sure NET8 is its own defined constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Deadpikle committed Oct 8, 2023
1 parent 8d2be27 commit fa2431e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/NetSparkle.Tests/SparkleUpdaterFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions src/NetSparkle/Configurations/JSONConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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<SavedConfigurationData>(json);
#else
var data = JsonConvert.DeserializeObject<SavedConfigurationData>(json);
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/NetSparkle/Configurations/RegistryConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -140,7 +140,7 @@ private DateTime ConvertStringToDate(string str)
/// <returns><c>true</c> if the items were loaded successfully; false otherwise</returns>
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;
Expand Down Expand Up @@ -212,7 +212,7 @@ private void SaveDidRunOnceAsTrue(string regPath)
/// <returns><c>true</c> if the values were saved to the registry; false otherwise</returns>
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;
Expand Down
4 changes: 2 additions & 2 deletions src/NetSparkle/NetSparkle.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0|AnyCPU'">
<OutputPath>..\bin\Release\NetSparkle\</OutputPath>
<DocumentationFile>..\bin\Release\NetSparkle\NetSparkle.xml</DocumentationFile>
<DefineConstants>TRACE;NETCORE;NET7</DefineConstants>
<DefineConstants>TRACE;NETCORE;NET8</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0|AnyCPU'">
<OutputPath>..\bin\Debug\NetSparkle\</OutputPath>
<DocumentationFile>..\bin\Debug\NetSparkle\NetSparkle.xml</DocumentationFile>
<DefineConstants>DEBUG;TRACE;NETCORE;NET7</DefineConstants>
<DefineConstants>DEBUG;TRACE;NETCORE;NET8</DefineConstants>
</PropertyGroup>
<!-- .NET 4.5.2 references, compilation flags and build options -->
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
Expand Down
4 changes: 2 additions & 2 deletions src/NetSparkle/SparkleUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit fa2431e

Please sign in to comment.