From 461735eae52ca7293c481ecf85ecd64a43236ef4 Mon Sep 17 00:00:00 2001 From: yangzheng06 Date: Fri, 8 Mar 2024 19:47:08 +0800 Subject: [PATCH] Update framework supports the latest version. --- .../Wif.Demo.Common/Wif.Demo.Common.csproj | 2 +- Source/Demos/Wif.Demo/Wif.Demo.csproj | 2 +- Source/Wif.Core/Wif.Core.csproj | 8 +++++++- .../Wif.Infrastructure.csproj | 8 +++++++- .../BinarySerializationExtensions.cs | 4 ++++ .../Helpers/SerializationHelper.cs | 4 ++++ Source/Wif.Utilities/Wif.Utilities.csproj | 20 ++++++++++++++++++- Source/Wif.sln.DotSettings | 3 ++- 8 files changed, 45 insertions(+), 6 deletions(-) diff --git a/Source/Demos/Wif.Demo.Common/Wif.Demo.Common.csproj b/Source/Demos/Wif.Demo.Common/Wif.Demo.Common.csproj index f172bb1..19dad82 100644 --- a/Source/Demos/Wif.Demo.Common/Wif.Demo.Common.csproj +++ b/Source/Demos/Wif.Demo.Common/Wif.Demo.Common.csproj @@ -1,7 +1,7 @@ - net462;net472;netcoreapp3.1;net5.0-windows + net462;net472;net6.0-windows;net8.0-windows true default diff --git a/Source/Demos/Wif.Demo/Wif.Demo.csproj b/Source/Demos/Wif.Demo/Wif.Demo.csproj index 3a5f8c3..8cfd6f0 100644 --- a/Source/Demos/Wif.Demo/Wif.Demo.csproj +++ b/Source/Demos/Wif.Demo/Wif.Demo.csproj @@ -2,7 +2,7 @@ WinExe - net462;net472;netcoreapp3.1;net5.0-windows + net462;net472;net6.0-windows;net8.0-windows true default diff --git a/Source/Wif.Core/Wif.Core.csproj b/Source/Wif.Core/Wif.Core.csproj index 5ef1a09..0ea626b 100644 --- a/Source/Wif.Core/Wif.Core.csproj +++ b/Source/Wif.Core/Wif.Core.csproj @@ -1,6 +1,6 @@  - net462;net472;netcoreapp3.1;net5.0-windows + net462;net472;net6.0-windows;net8.0-windows true Frontier.Wif.Core 0.3.0.21349 @@ -24,6 +24,12 @@ ..\Output\Release\ ..\Output\Release\Wif.Core.xml + + 7 + + + 7 + diff --git a/Source/Wif.Infrastructure/Wif.Infrastructure.csproj b/Source/Wif.Infrastructure/Wif.Infrastructure.csproj index da16de4..19ff108 100644 --- a/Source/Wif.Infrastructure/Wif.Infrastructure.csproj +++ b/Source/Wif.Infrastructure/Wif.Infrastructure.csproj @@ -1,6 +1,6 @@  - net462;net472;netcoreapp3.1;net5.0-windows + net462;net472;net6.0-windows;net8.0-windows true Frontier.Wif.Infrastructure 0.3.0.21349 @@ -25,6 +25,12 @@ ..\Output\Release\ ..\Output\Release\Wif.Infrastructure.xml + + 7 + + + 7 + diff --git a/Source/Wif.Utilities/Extensions/BinarySerializationExtensions.cs b/Source/Wif.Utilities/Extensions/BinarySerializationExtensions.cs index 434d38d..35a997d 100644 --- a/Source/Wif.Utilities/Extensions/BinarySerializationExtensions.cs +++ b/Source/Wif.Utilities/Extensions/BinarySerializationExtensions.cs @@ -28,9 +28,11 @@ public static class BinarySerializationExtensions /// public static T Deserialize(this Stream stream) { +#pragma warning disable SYSLIB0011 var formatter = new BinaryFormatter(); stream.Position = 0; return (T) formatter.Deserialize(stream); +#pragma warning disable SYSLIB0011 } /// @@ -40,10 +42,12 @@ public static T Deserialize(this Stream stream) /// public static Stream Serialize(this object source) { +#pragma warning disable SYSLIB0011 var formatter = new BinaryFormatter(); var stream = new MemoryStream(); formatter.Serialize(stream, source); return stream; +#pragma warning disable SYSLIB0011 } #endregion diff --git a/Source/Wif.Utilities/Helpers/SerializationHelper.cs b/Source/Wif.Utilities/Helpers/SerializationHelper.cs index 2b543fe..56da7d0 100644 --- a/Source/Wif.Utilities/Helpers/SerializationHelper.cs +++ b/Source/Wif.Utilities/Helpers/SerializationHelper.cs @@ -188,6 +188,7 @@ public static void SerializeObjectToXmlFile(object sourceObject, string targetFi /// private static T DeserializeFromBytes(byte[] source) { +#pragma warning disable SYSLIB0011 var obj = default(T); IFormatter formatter = new BinaryFormatter(); T result; @@ -198,6 +199,7 @@ private static T DeserializeFromBytes(byte[] source) } return result; +#pragma warning disable SYSLIB0011 } /// @@ -208,6 +210,7 @@ private static T DeserializeFromBytes(byte[] source) /// private static byte[] SerializeToBytes(T obj) { +#pragma warning disable SYSLIB0011 IFormatter formatter = new BinaryFormatter(); byte[] result; using (var memoryStream = new MemoryStream()) @@ -218,6 +221,7 @@ private static byte[] SerializeToBytes(T obj) } return result; +#pragma warning disable SYSLIB0011 } #endregion diff --git a/Source/Wif.Utilities/Wif.Utilities.csproj b/Source/Wif.Utilities/Wif.Utilities.csproj index 1ec63fe..5ab2831 100644 --- a/Source/Wif.Utilities/Wif.Utilities.csproj +++ b/Source/Wif.Utilities/Wif.Utilities.csproj @@ -1,6 +1,6 @@  - net462;net472;netcoreapp3.1;net5.0-windows + net462;net472;net6.0-windows;net8.0-windows true true Frontier.Wif.Utilities @@ -25,6 +25,24 @@ ..\Output\Release\ ..\Output\Release\Wif.Utilities.xml + + 6 + + + 6 + + + 4 + + + 4 + + + 7 + + + 7 + all diff --git a/Source/Wif.sln.DotSettings b/Source/Wif.sln.DotSettings index 6c7ad0b..3b512b3 100644 --- a/Source/Wif.sln.DotSettings +++ b/Source/Wif.sln.DotSettings @@ -321,6 +321,7 @@ 12 2 0 + True True True True @@ -343,7 +344,7 @@ True True True - anonymous + C:\Users\leoli\AppData\Local\Temp\JetBrains\58a2b74a-22b9-439d-a5b4-772306c6323a True True