From fce0215608390f238212c51a34dea1c4abc11d44 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Wed, 10 Jan 2024 22:20:43 +0800
Subject: [PATCH] chore: support for .net 8.0.
---
.github/workflows/build.yml | 4 ++--
.github/workflows/dotnet-format.yml | 12 ++++++------
.github/workflows/push-to-myget.yml | 2 +-
build/build-for-myget.nuspec | 15 +++++++++++++++
build/build.Lang.ca-ES.nuspec | 2 ++
build/build.Lang.cs.nuspec | 2 ++
build/build.Lang.en.nuspec | 2 ++
build/build.Lang.es.nuspec | 2 ++
build/build.Lang.fa.nuspec | 2 ++
build/build.Lang.fr.nuspec | 2 ++
build/build.Lang.ja.nuspec | 2 ++
build/build.Lang.ko-KR.nuspec | 2 ++
build/build.Lang.pl.nuspec | 2 ++
build/build.Lang.pt-BR.nuspec | 2 ++
build/build.Lang.ru.nuspec | 2 ++
build/build.Lang.template.nuspec | 2 ++
build/build.Lang.tr.nuspec | 2 ++
build/build.cake | 3 ++-
build/build.nuspec | 5 +++++
.../HandyControlDemo_Net_GE45.csproj | 2 +-
.../HandyControl_Net_GE45.csproj | 2 +-
.../HandyControlDemo_Code.csproj | 2 +-
.../Tools/Helper/VersionHelper.cs | 2 ++
23 files changed, 62 insertions(+), 13 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a03995da..042156d3 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,9 +10,9 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@master
with:
- dotnet-version: '7.0.x'
+ dotnet-version: '8.0.x'
include-prerelease: true
-
+
- name: Build
shell: pwsh
run: |
diff --git a/.github/workflows/dotnet-format.yml b/.github/workflows/dotnet-format.yml
index 677ac35c..27ce4112 100644
--- a/.github/workflows/dotnet-format.yml
+++ b/.github/workflows/dotnet-format.yml
@@ -1,8 +1,8 @@
name: Code format check
-on:
+on:
push:
- branches:
+ branches:
- master
jobs:
dotnet-format:
@@ -13,13 +13,13 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
-
+
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@master
with:
- dotnet-version: '7.0.x'
+ dotnet-version: '8.0.x'
include-prerelease: true
-
+
# 代码文件编码规范机器人,详细请看 [dotnet 在 GitHub 的 Action 上部署自动代码编码规范机器人](https://blog.lindexi.com/post/dotnet-%E5%9C%A8-GitHub-%E7%9A%84-Action-%E4%B8%8A%E9%83%A8%E7%BD%B2%E8%87%AA%E5%8A%A8%E4%BB%A3%E7%A0%81%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83%E6%9C%BA%E5%99%A8%E4%BA%BA.html)
- name: Install dotnetCampus.EncodingNormalior
run: dotnet tool update -g dotnetCampus.EncodingNormalior
@@ -41,7 +41,7 @@ jobs:
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -a -m 'Automated dotnet-format update'
continue-on-error: true
-
+
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
diff --git a/.github/workflows/push-to-myget.yml b/.github/workflows/push-to-myget.yml
index 4bef621e..c899273a 100644
--- a/.github/workflows/push-to-myget.yml
+++ b/.github/workflows/push-to-myget.yml
@@ -10,7 +10,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@master
with:
- dotnet-version: '7.0.x'
+ dotnet-version: '8.0.x'
include-prerelease: true
- name: setup nuget.exe
diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec
index 4315c61e..2fc76df7 100644
--- a/build/build-for-myget.nuspec
+++ b/build/build-for-myget.nuspec
@@ -31,6 +31,7 @@
+
@@ -232,6 +233,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/build.Lang.ca-ES.nuspec b/build/build.Lang.ca-ES.nuspec
index f7e395f2..96dc5141 100644
--- a/build/build.Lang.ca-ES.nuspec
+++ b/build/build.Lang.ca-ES.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.cs.nuspec b/build/build.Lang.cs.nuspec
index 376d2e3d..631925a8 100644
--- a/build/build.Lang.cs.nuspec
+++ b/build/build.Lang.cs.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.en.nuspec b/build/build.Lang.en.nuspec
index f9f3c221..20990224 100644
--- a/build/build.Lang.en.nuspec
+++ b/build/build.Lang.en.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.es.nuspec b/build/build.Lang.es.nuspec
index ba7ee7f7..aeeadced 100644
--- a/build/build.Lang.es.nuspec
+++ b/build/build.Lang.es.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.fa.nuspec b/build/build.Lang.fa.nuspec
index d83818c9..71c900e0 100644
--- a/build/build.Lang.fa.nuspec
+++ b/build/build.Lang.fa.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.fr.nuspec b/build/build.Lang.fr.nuspec
index a5f59c0c..5e908687 100644
--- a/build/build.Lang.fr.nuspec
+++ b/build/build.Lang.fr.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.ja.nuspec b/build/build.Lang.ja.nuspec
index c269e81b..e2665730 100644
--- a/build/build.Lang.ja.nuspec
+++ b/build/build.Lang.ja.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.ko-KR.nuspec b/build/build.Lang.ko-KR.nuspec
index e2010d8e..97bd0c8e 100644
--- a/build/build.Lang.ko-KR.nuspec
+++ b/build/build.Lang.ko-KR.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.pl.nuspec b/build/build.Lang.pl.nuspec
index 6066bcee..e6f01ed8 100644
--- a/build/build.Lang.pl.nuspec
+++ b/build/build.Lang.pl.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.pt-BR.nuspec b/build/build.Lang.pt-BR.nuspec
index 2cb0c441..03c51d59 100644
--- a/build/build.Lang.pt-BR.nuspec
+++ b/build/build.Lang.pt-BR.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.ru.nuspec b/build/build.Lang.ru.nuspec
index d234ed62..b36f37ad 100644
--- a/build/build.Lang.ru.nuspec
+++ b/build/build.Lang.ru.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.template.nuspec b/build/build.Lang.template.nuspec
index 15777b68..c9fd0f9a 100644
--- a/build/build.Lang.template.nuspec
+++ b/build/build.Lang.template.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.Lang.tr.nuspec b/build/build.Lang.tr.nuspec
index 3c4847b7..63719583 100644
--- a/build/build.Lang.tr.nuspec
+++ b/build/build.Lang.tr.nuspec
@@ -33,6 +33,7 @@
+
@@ -51,6 +52,7 @@
+
diff --git a/build/build.cake b/build/build.cake
index c9c534c3..599f985c 100644
--- a/build/build.cake
+++ b/build/build.cake
@@ -35,7 +35,8 @@ Task("Build")
"netcoreapp3.1",
"net5.0-windows",
"net6.0-windows",
- "net7.0-windows"
+ "net7.0-windows",
+ "net8.0-windows"
};
foreach (var framework in frameworkList)
diff --git a/build/build.nuspec b/build/build.nuspec
index bfc9e9d9..2a8f75ec 100644
--- a/build/build.nuspec
+++ b/build/build.nuspec
@@ -33,6 +33,7 @@
+
@@ -84,6 +85,10 @@
+
+
+
+
diff --git a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
index 5e8a1e83..b2cee7b7 100644
--- a/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
+++ b/src/Net_GE45/HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj
@@ -3,7 +3,7 @@
WinExe
HandyControlDemo
HandyControlDemo
- netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows
+ netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows
..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico
0108;MSB3026;MSB3061;SYSLIB0014
NETSDK1138
diff --git a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj
index 94913857..4a5ea08d 100644
--- a/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj
+++ b/src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj
@@ -2,7 +2,7 @@
HandyControl
HandyControl
- netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows
+ netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows
Contains some simple and commonly used WPF controls
HandyControl
snupkg
diff --git a/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj b/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
index ee7c6d25..1b8cd671 100644
--- a/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
+++ b/src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj
@@ -3,7 +3,7 @@
true
HandyControlDemoCode
HandyControlDemoCode
- netcoreapp3.0;netcoreapp3.1;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows
+ netcoreapp3.0;netcoreapp3.1;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net481;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows
MSB3026;MSB3061
NETSDK1138
diff --git a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs
index d6cde51b..15740023 100644
--- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs
+++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs
@@ -38,6 +38,8 @@ internal class VersionHelper
var netVersion = ".NET 6.0";
#elif NET7_0
var netVersion = ".NET 7.0";
+#elif NET8_0
+ var netVersion = ".NET 8.0";
#elif NETCOREAPP3_0
var netVersion = ".NET CORE 3.0";
#elif NETCOREAPP3_1