From 4e4a12f2e7f4db31673a454d4fa3c400c809e7c8 Mon Sep 17 00:00:00 2001 From: afunc233 Date: Sun, 14 Nov 2021 02:12:08 +0800 Subject: [PATCH 1/7] =?UTF-8?q?net6.0=20=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HandyControlDemo_Net_GE45/HandyControlDemo_Net_GE45.csproj | 2 +- src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj | 2 +- src/Shared/HandyControlDemo_Code/HandyControlDemo_Code.csproj | 2 +- .../HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) 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 9aaf0808..2eb1c132 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;net5.0-windows + netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows;net6.0-windows ..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico 0108;MSB3026;MSB3061 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 218a6f01..1881b318 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;net5.0-windows + netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows;net6.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 9e3731c4..237b3fcf 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;net5.0-windows + netcoreapp3.0;netcoreapp3.1;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows;net6.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 b5fe3372..84bbed1c 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs @@ -32,6 +32,8 @@ namespace HandyControlDemo.Tools var netVersion = "NET 48"; #elif NET5_0 var netVersion = "NET 50"; +#elif NET6_0 + var netVersion = "NET 60"; #elif NETCOREAPP3_0 var netVersion = "CORE 30"; #elif NETCOREAPP3_1 From de21909def30d5516c527499a9a798bbef68a570 Mon Sep 17 00:00:00 2001 From: afunc233 Date: Sun, 14 Nov 2021 02:49:13 +0800 Subject: [PATCH 2/7] Modify build.cake --- build/build.cake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/build.cake b/build/build.cake index 34b6f839..cca3a628 100644 --- a/build/build.cake +++ b/build/build.cake @@ -107,6 +107,13 @@ Task("Build") OutputDirectory = "lib/net5.0" }; + var settingsNet60 = new DotNetCoreBuildSettings + { + Configuration = "Release", + Framework = "net6.0-windows", + OutputDirectory = "lib/net6.0" + }; + DotNetCoreBuild("../src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj", settingsNet40); DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet45); DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet451); @@ -121,6 +128,7 @@ Task("Build") DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsCore30); DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsCore31); DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet50); + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet60); }); RunTarget(target); \ No newline at end of file From 9f5942104677af46acd0a85571bd865dd13022f8 Mon Sep 17 00:00:00 2001 From: afunc233 Date: Sun, 14 Nov 2021 02:54:58 +0800 Subject: [PATCH 3/7] Modify build.yml --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9212433..de4f707b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,13 @@ jobs: - name: checkout uses: actions/checkout@master + - name: Install .NET 60 + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0' + include-prerelease: True + + - name: build shell: pwsh run: | From a450f26616a68643b8ff863b3bffec4da8dc2bde Mon Sep 17 00:00:00 2001 From: afunc233 Date: Sun, 14 Nov 2021 02:56:21 +0800 Subject: [PATCH 4/7] Modify build.yml --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de4f707b..67771560 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,10 +8,10 @@ jobs: uses: actions/checkout@master - name: Install .NET 60 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '6.0' - include-prerelease: True + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '6.0' + include-prerelease: True - name: build From 8d5e4706ad505750fee2e56f2e263b99bdeceded Mon Sep 17 00:00:00 2001 From: afunc233 Date: Sun, 14 Nov 2021 02:12:08 +0800 Subject: [PATCH 5/7] feat: support for .net 6.0 --- .github/workflows/build.yml | 2 +- build/build-for-myget.nuspec | 15 ++ build/build.Lang.ca-ES.nuspec | 2 + build/build.Lang.en.nuspec | 2 + build/build.Lang.fa.nuspec | 2 + build/build.Lang.fr.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.tr.nuspec | 2 + build/build.cake | 134 ++++-------------- build/build.nuspec | 16 ++- .../HandyControlDemo_Net_GE45.csproj | 2 +- .../HandyControl_Net_GE45.csproj | 2 +- .../HandyControlDemo_Code.csproj | 2 +- .../Tools/Helper/VersionHelper.cs | 2 + 17 files changed, 80 insertions(+), 113 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9212433..0d532687 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ jobs: steps: - name: checkout uses: actions/checkout@master - + - name: build shell: pwsh run: | diff --git a/build/build-for-myget.nuspec b/build/build-for-myget.nuspec index 6f0627e0..38c59562 100644 --- a/build/build-for-myget.nuspec +++ b/build/build-for-myget.nuspec @@ -27,6 +27,7 @@ + @@ -176,6 +177,20 @@ + + + + + + + + + + + + + + diff --git a/build/build.Lang.ca-ES.nuspec b/build/build.Lang.ca-ES.nuspec index 0eb2c076..9437f2fd 100644 --- a/build/build.Lang.ca-ES.nuspec +++ b/build/build.Lang.ca-ES.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.en.nuspec b/build/build.Lang.en.nuspec index 047a46cc..e4670a24 100644 --- a/build/build.Lang.en.nuspec +++ b/build/build.Lang.en.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.fa.nuspec b/build/build.Lang.fa.nuspec index f5c42b9c..8f1dca9f 100644 --- a/build/build.Lang.fa.nuspec +++ b/build/build.Lang.fa.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.fr.nuspec b/build/build.Lang.fr.nuspec index a95c7db7..b62334dd 100644 --- a/build/build.Lang.fr.nuspec +++ b/build/build.Lang.fr.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.ko-KR.nuspec b/build/build.Lang.ko-KR.nuspec index f9f05d5d..3c7ce9c9 100644 --- a/build/build.Lang.ko-KR.nuspec +++ b/build/build.Lang.ko-KR.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.pl.nuspec b/build/build.Lang.pl.nuspec index 6c105a27..aede389f 100644 --- a/build/build.Lang.pl.nuspec +++ b/build/build.Lang.pl.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.pt-BR.nuspec b/build/build.Lang.pt-BR.nuspec index 5ae43e22..4862d273 100644 --- a/build/build.Lang.pt-BR.nuspec +++ b/build/build.Lang.pt-BR.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.ru.nuspec b/build/build.Lang.ru.nuspec index 7256fb00..71e8eb06 100644 --- a/build/build.Lang.ru.nuspec +++ b/build/build.Lang.ru.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.Lang.tr.nuspec b/build/build.Lang.tr.nuspec index 1ac7f1a7..5c5ff8e4 100644 --- a/build/build.Lang.tr.nuspec +++ b/build/build.Lang.tr.nuspec @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ + diff --git a/build/build.cake b/build/build.cake index 34b6f839..f0e90dc2 100644 --- a/build/build.cake +++ b/build/build.cake @@ -16,111 +16,37 @@ Task("Build") OutputDirectory = "lib/net40" }; - var settingsNet45 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net45", - OutputDirectory = "lib/net45" - }; - - var settingsNet451 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net451", - OutputDirectory = "lib/net451" - }; - - var settingsNet452 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net452", - OutputDirectory = "lib/net452" - }; - - var settingsNet46 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net46", - OutputDirectory = "lib/net46" - }; - - var settingsNet461 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net461", - OutputDirectory = "lib/net461" - }; - - var settingsNet462 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net462", - OutputDirectory = "lib/net462" - }; - - var settingsNet47 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net47", - OutputDirectory = "lib/net47" - }; - - var settingsNet471 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net471", - OutputDirectory = "lib/net471" - }; - - var settingsNet472 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net472", - OutputDirectory = "lib/net472" - }; - - var settingsNet48 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net48", - OutputDirectory = "lib/net48" - }; - - var settingsCore30 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "netcoreapp3.0", - OutputDirectory = "lib/netcoreapp3.0" - }; - - var settingsCore31 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "netcoreapp3.1", - OutputDirectory = "lib/netcoreapp3.1" - }; - - var settingsNet50 = new DotNetCoreBuildSettings - { - Configuration = "Release", - Framework = "net5.0-windows", - OutputDirectory = "lib/net5.0" - }; - DotNetCoreBuild("../src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj", settingsNet40); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet45); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet451); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet452); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet46); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet461); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet462); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet47); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet471); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet472); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet48); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsCore30); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsCore31); - DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settingsNet50); + + var frameworkList = new List + { + "net45", + "net451", + "net452", + "net46", + "net461", + "net462", + "net47", + "net471", + "net472", + "net48", + "netcoreapp3.0", + "netcoreapp3.1", + "net5.0-windows", + "net6.0-windows" + }; + + foreach (var framework in frameworkList) + { + var settings = new DotNetCoreBuildSettings + { + Configuration = "Release", + Framework = framework, + OutputDirectory = $"lib/{framework}" + }; + + DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settings); + } }); RunTarget(target); \ No newline at end of file diff --git a/build/build.nuspec b/build/build.nuspec index e1d504a5..ab1cc7b0 100644 --- a/build/build.nuspec +++ b/build/build.nuspec @@ -30,6 +30,7 @@ + @@ -66,11 +67,16 @@ - - - - - + + + + + + + + + + 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 9aaf0808..2eb1c132 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;net5.0-windows + netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows;net6.0-windows ..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico 0108;MSB3026;MSB3061 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 218a6f01..1881b318 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;net5.0-windows + netcoreapp3.0;netcoreapp3.1;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows;net6.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 9e3731c4..237b3fcf 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;net5.0-windows + netcoreapp3.0;netcoreapp3.1;net40;net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;net5.0-windows;net6.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 b5fe3372..84bbed1c 100644 --- a/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs +++ b/src/Shared/HandyControlDemo_Shared/Tools/Helper/VersionHelper.cs @@ -32,6 +32,8 @@ namespace HandyControlDemo.Tools var netVersion = "NET 48"; #elif NET5_0 var netVersion = "NET 50"; +#elif NET6_0 + var netVersion = "NET 60"; #elif NETCOREAPP3_0 var netVersion = "CORE 30"; #elif NETCOREAPP3_1 From 74c040a35375cd191fd6ceef2e1a297f41b4cd26 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Tue, 14 Dec 2021 22:58:25 +0800 Subject: [PATCH 6/7] chore: add Setup .NET Core SDK action --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d532687..21c7f4de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,10 +4,13 @@ jobs: build: runs-on: windows-latest steps: - - name: checkout + - name: Checkout uses: actions/checkout@master - - name: build + - name: Setup .NET Core SDK + uses: actions/setup-dotnet@master + + - name: Build shell: pwsh run: | cd build From d5b2de8e00d49b1f410d8097818a2af43d0cf2b5 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Tue, 14 Dec 2021 23:04:39 +0800 Subject: [PATCH 7/7] chore: add dotnet-version for Setup .NET Core SDK action --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21c7f4de..85ac437c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,9 @@ jobs: - name: Setup .NET Core SDK uses: actions/setup-dotnet@master + with: + dotnet-version: '6.0.x' + include-prerelease: true - name: Build shell: pwsh