From 0e0dc4eb4f802a590f49968e7761597290293528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=A4=A7=E7=9F=B3=E5=A4=B4?= Date: Wed, 13 Nov 2024 12:57:41 +0800 Subject: [PATCH] =?UTF-8?q?v11.0.2024.1113=20=E5=8D=87=E7=BA=A7dotnet9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish-beta.yml | 1 + .github/workflows/publish.yml | 1 + .github/workflows/test.yml | 1 + NewLife.Core/Http/HttpHelper.cs | 2 +- NewLife.Core/NewLife.Core.csproj | 24 ++++++++++++------- Readme.MD | 2 +- .../Zero.EchoServer/Zero.EchoServer.csproj | 2 +- .../Zero.HttpServer/Zero.HttpServer.csproj | 2 +- Samples/Zero.Server/Zero.Server.csproj | 2 +- Test/Test.csproj | 4 ++-- Test2/Test2.csproj | 1 - XUnitTest.Core/XUnitTest.Core.csproj | 6 ++--- 12 files changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml index cbdf4fe8e..1b375b6f9 100644 --- a/.github/workflows/publish-beta.yml +++ b/.github/workflows/publish-beta.yml @@ -25,6 +25,7 @@ jobs: 7.x 8.x 9.x + cache: true - name: Get Version run: echo "VERSION=$(date '+%Y.%m%d-beta%H%M')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9411f9c93..d829b89cd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,6 +19,7 @@ jobs: 7.x 8.x 9.x + cache: true - name: Get Version run: echo "VERSION=$(date '+%Y.%m%d')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 391157bd0..e377ae6e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,7 @@ jobs: 7.x 8.x 9.x + cache: true - name: Build run: | dotnet build -c Release diff --git a/NewLife.Core/Http/HttpHelper.cs b/NewLife.Core/Http/HttpHelper.cs index 9804bdcf3..a14517dc1 100644 --- a/NewLife.Core/Http/HttpHelper.cs +++ b/NewLife.Core/Http/HttpHelper.cs @@ -408,7 +408,7 @@ public static async Task PostFormAsync(this HttpClient client, String re { content = new StringContent(str, Encoding.UTF8, "application/x-www-form-urlencoded"); } -#if NET5_0 +#if NET5_0_OR_GREATER else if (data is IDictionary dic) { content = new FormUrlEncodedContent(dic); diff --git a/NewLife.Core/NewLife.Core.csproj b/NewLife.Core/NewLife.Core.csproj index 0b6df7c8d..4e65bc1a5 100644 --- a/NewLife.Core/NewLife.Core.csproj +++ b/NewLife.Core/NewLife.Core.csproj @@ -1,6 +1,6 @@  - net45;net461;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net5.0-windows;net6.0-windows;net7.0;net7.0-windows;net8.0;net8.0-windows;net9.0;net9.0-windows + net45;net461;net462;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net5.0-windows;net6.0-windows;net7.0;net7.0-windows;net8.0;net8.0-windows;net9.0;net9.0-windows NewLife.Core NewLife NewLife组件核心库 @@ -45,7 +45,7 @@ - + $(DefineConstants);__WIN__ @@ -62,25 +62,31 @@ - + - + - - + + + + + + + + - + - - + + diff --git a/Readme.MD b/Readme.MD index d2909cf67..f09bdb83b 100644 --- a/Readme.MD +++ b/Readme.MD @@ -11,7 +11,7 @@ 核心库教程:[https://newlifex.com/core](https://newlifex.com/core) ## 新生命项目矩阵 -各项目默认支持net8.0/netstandard2.1/netstandard2.0/net4.61/net4.5,旧版(2023.0401)支持net4.0/net2.0 +各项目默认支持net9.0/netstandard2.1/netstandard2.0/net4.61/net4.5,旧版(2023.0401)支持net4.0/net2.0 | 项目 | 年份 | 说明 | | :--------------------------------------------------------------: | :---: | -------------------------------------------------------------------------------------- | diff --git a/Samples/Zero.EchoServer/Zero.EchoServer.csproj b/Samples/Zero.EchoServer/Zero.EchoServer.csproj index 5ae8cd577..065a28fed 100644 --- a/Samples/Zero.EchoServer/Zero.EchoServer.csproj +++ b/Samples/Zero.EchoServer/Zero.EchoServer.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 回声服务器 网络回声服务端,把收到的数据原样发回去,用于网络性能压测 新生命开发团队 diff --git a/Samples/Zero.HttpServer/Zero.HttpServer.csproj b/Samples/Zero.HttpServer/Zero.HttpServer.csproj index a814e22c9..fae7ce6bf 100644 --- a/Samples/Zero.HttpServer/Zero.HttpServer.csproj +++ b/Samples/Zero.HttpServer/Zero.HttpServer.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 Http服务器 轻量级Http服务器,支持WebSocket,可用于追求简单Http服务的场景,例如暴露硬件控制为Http接口,如打印组件 新生命开发团队 diff --git a/Samples/Zero.Server/Zero.Server.csproj b/Samples/Zero.Server/Zero.Server.csproj index dc1fdd97c..db463f9fc 100644 --- a/Samples/Zero.Server/Zero.Server.csproj +++ b/Samples/Zero.Server/Zero.Server.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 网络服务器 高性能网络服务器,单机最高400万连接,可用于建立各种协议的网络服务器 新生命开发团队 diff --git a/Test/Test.csproj b/Test/Test.csproj index 6320fb9c4..f3b4d5fe0 100644 --- a/Test/Test.csproj +++ b/Test/Test.csproj @@ -1,7 +1,7 @@  Exe - net45;net8.0;net9.0 + net45;net461;net462;net8.0;net9.0 9.0 $([System.DateTime]::Now.ToString(`yyyy.MMdd`)) $(VersionPrefix).$(VersionSuffix) @@ -26,7 +26,7 @@ - + diff --git a/Test2/Test2.csproj b/Test2/Test2.csproj index 9e94b4aab..ff34fbe08 100644 --- a/Test2/Test2.csproj +++ b/Test2/Test2.csproj @@ -25,7 +25,6 @@ - diff --git a/XUnitTest.Core/XUnitTest.Core.csproj b/XUnitTest.Core/XUnitTest.Core.csproj index fa7658f84..936c86d72 100644 --- a/XUnitTest.Core/XUnitTest.Core.csproj +++ b/XUnitTest.Core/XUnitTest.Core.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 false XUnitTest pdbonly @@ -55,11 +55,11 @@ - + - + all