Add .NET Standard 2.0 and 2.1

This commit is contained in:
Matt Nadareski
2025-07-24 09:19:38 -04:00
parent da28ce310b
commit 3cbfd5cd10
8 changed files with 9 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ namespace InfoPrint
// Loop through the input paths
foreach (string inputPath in options.InputPaths)
{
#if NETFRAMEWORK
#if NETFRAMEWORK || NETSTANDARD2_0_OR_GREATER
PrintPathInfo(inputPath, false, options.Debug);
#else
PrintPathInfo(inputPath, options.Json, options.Debug);

View File

@@ -114,7 +114,7 @@ namespace SabreTools.Serialization.Deserializers
return 0;
// Match the version to header length
#if NET472_OR_GREATER || NETCOREAPP
#if NET472_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
return (version, length) switch
{
(1, Constants.HeaderV1Size) => version,

View File

@@ -75,7 +75,7 @@ namespace SabreTools.Serialization.Deserializers
}
// Split the line for the name iteratively
#if NETFRAMEWORK || NETCOREAPP3_1
#if NETFRAMEWORK || NETCOREAPP3_1 || NETSTANDARD2_0_OR_GREATER
string[] lineParts = line.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
if (lineParts.Length == 1)
lineParts = line.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
@@ -99,7 +99,7 @@ namespace SabreTools.Serialization.Deserializers
if (trimmedLine == null)
continue;
#if NETFRAMEWORK || NETCOREAPP3_1
#if NETFRAMEWORK || NETCOREAPP3_1 || NETSTANDARD2_0_OR_GREATER
lineParts = trimmedLine.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
#else
lineParts = trimmedLine.Split(' ', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
#if NET35_OR_GREATER || NETCOREAPP
#if NET35_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
using System.Linq;
#endif
using System.Text;

View File

@@ -25,7 +25,7 @@ namespace SabreTools.Serialization.Deserializers
var settings = new XmlReaderSettings
{
CheckCharacters = false,
#if NET40_OR_GREATER || NETCOREAPP
#if NET40_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
DtdProcessing = DtdProcessing.Ignore,
#endif
ValidationFlags = XmlSchemaValidationFlags.None,

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<!-- Assembly Properties -->
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>

View File

@@ -104,7 +104,7 @@ namespace SabreTools.Serialization.Serializers
Encoding = Encoding.UTF8,
Indent = true,
IndentChars = "\t",
#if NET40_OR_GREATER || NETCOREAPP
#if NET40_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
NamespaceHandling = NamespaceHandling.OmitDuplicates,
#endif
NewLineChars = "\n",

View File

@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
#if NET35_OR_GREATER || NETCOREAPP
#if NET35_OR_GREATER || NETCOREAPP || NETSTANDARD2_0_OR_GREATER
using System.Linq;
#endif
using System.Text;