From ce2262a3fd67179a428436bb447756ac18e1ce60 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Sun, 12 Nov 2023 16:48:51 -0600 Subject: [PATCH] Update from .NET Framework 4.5 to 4.8 --- AutoUpdate/CKAN-autoupdate.csproj | 4 ++-- Cmdline/CKAN-cmdline.csproj | 6 +++--- ConsoleUI/CKAN-ConsoleUI.csproj | 6 +++--- Core/CKAN-core.csproj | 6 +++--- Core/Extensions/EnumerableExtensions.cs | 12 ++++++++---- GUI/CKAN-GUI.csproj | 6 +++--- GUI/Controls/ManageMods.Designer.cs | 5 +++-- Netkan/CKAN-netkan.csproj | 6 +++--- Tests/Tests.csproj | 8 ++++---- build.cake | 2 +- 10 files changed, 33 insertions(+), 28 deletions(-) diff --git a/AutoUpdate/CKAN-autoupdate.csproj b/AutoUpdate/CKAN-autoupdate.csproj index 7b8c631bae..49fecaac18 100644 --- a/AutoUpdate/CKAN-autoupdate.csproj +++ b/AutoUpdate/CKAN-autoupdate.csproj @@ -16,8 +16,8 @@ false 7 ..\assets\ckan.ico - net45 - v4.5 + net48 + v4.8 512 prompt 4 diff --git a/Cmdline/CKAN-cmdline.csproj b/Cmdline/CKAN-cmdline.csproj index b5f8011a3f..caa42b629a 100644 --- a/Cmdline/CKAN-cmdline.csproj +++ b/Cmdline/CKAN-cmdline.csproj @@ -14,11 +14,11 @@ true Debug;Release false - 7 - net45 + 7.3 + net48 CKAN.CmdLine.MainClass ..\assets\ckan.ico - v4.5 + v4.8 512 prompt 4 diff --git a/ConsoleUI/CKAN-ConsoleUI.csproj b/ConsoleUI/CKAN-ConsoleUI.csproj index 1d774b9e5e..446cbabeea 100644 --- a/ConsoleUI/CKAN-ConsoleUI.csproj +++ b/ConsoleUI/CKAN-ConsoleUI.csproj @@ -14,10 +14,10 @@ true Debug;Release false - 7 - net45 + 7.3 + net48 ..\assets\ckan.ico - v4.5 + v4.8 512 prompt 4 diff --git a/Core/CKAN-core.csproj b/Core/CKAN-core.csproj index 54fa033be1..9c3f6d12a4 100644 --- a/Core/CKAN-core.csproj +++ b/Core/CKAN-core.csproj @@ -14,7 +14,7 @@ true Debug;Release;Debug_NetCore;Release_NetCore false - 7 + 7.3 IDE1006 @@ -25,7 +25,7 @@ - net45 + net48 @@ -44,7 +44,7 @@ - + diff --git a/Core/Extensions/EnumerableExtensions.cs b/Core/Extensions/EnumerableExtensions.cs index 649ffc66cd..3a20f7dbee 100644 --- a/Core/Extensions/EnumerableExtensions.cs +++ b/Core/Extensions/EnumerableExtensions.cs @@ -117,7 +117,7 @@ public static TimeSpan Sum(this IEnumerable source) public static IEnumerable ZipMany(this IEnumerable seq1, IEnumerable seq2, Func> func) => seq1.Zip(seq2, func).SelectMany(seqs => seqs); -#if NET45 +#if NETFRAMEWORK /// /// Eliminate duplicate elements based on the value returned by a callback @@ -144,7 +144,7 @@ public static IEnumerable TraverseNodes(this T start, Func getNext) } } -#if NET45 +#if NETFRAMEWORK /// /// Make pairs out of the elements of two sequences @@ -155,6 +155,10 @@ public static IEnumerable TraverseNodes(this T start, Func getNext) public static IEnumerable> Zip(this IEnumerable seq1, IEnumerable seq2) => seq1.Zip(seq2, (item1, item2) => new Tuple(item1, item2)); +#endif + +#if NET45 + /// /// Enable a `foreach` over a sequence of tuples /// @@ -201,6 +205,8 @@ public static void Deconstruct(this Tuple tuple, item4 = tuple.Item4; } +#endif + /// /// Enable a `foreach` over a sequence of key value pairs /// @@ -213,8 +219,6 @@ public static void Deconstruct(this KeyValuePair kvp, out T1 key val = kvp.Value; } -#endif - } /// diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index 50736ea53a..0d18e79b25 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -14,10 +14,10 @@ true Debug;Release false - 7 - net45 + 7.3 + net48 ..\assets\ckan.ico - v4.5 + v4.8 512 prompt 4 diff --git a/GUI/Controls/ManageMods.Designer.cs b/GUI/Controls/ManageMods.Designer.cs index 44772b35b0..6aecdbb1a9 100644 --- a/GUI/Controls/ManageMods.Designer.cs +++ b/GUI/Controls/ManageMods.Designer.cs @@ -86,9 +86,9 @@ private void InitializeComponent() this.ModListContextMenuStrip.SuspendLayout(); this.ModListHeaderContextMenuStrip.SuspendLayout(); this.SuspendLayout(); - // + // // Tooltip - // + // this.ToolTip.AutoPopDelay = 10000; this.ToolTip.InitialDelay = 250; this.ToolTip.ReshowDelay = 250; @@ -300,6 +300,7 @@ private void InitializeComponent() this.ModGrid.BackgroundColor = System.Drawing.SystemColors.Window; this.ModGrid.EnableHeadersVisualStyles = false; this.ModGrid.ColumnHeadersDefaultCellStyle.BackColor = System.Drawing.SystemColors.Control; + this.ModGrid.ColumnHeadersDefaultCellStyle.SelectionBackColor = System.Drawing.SystemColors.Control; this.ModGrid.ColumnHeadersDefaultCellStyle.ForeColor = System.Drawing.SystemColors.ControlText; this.ModGrid.DefaultCellStyle.ForeColor = System.Drawing.SystemColors.WindowText; this.ModGrid.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; diff --git a/Netkan/CKAN-netkan.csproj b/Netkan/CKAN-netkan.csproj index 4272a877e7..e54a5b3715 100644 --- a/Netkan/CKAN-netkan.csproj +++ b/Netkan/CKAN-netkan.csproj @@ -14,11 +14,11 @@ true Debug;Release false - 7 - net45 + 7.3 + net48 CKAN.NetKAN.Program ..\assets\ckan.ico - v4.5 + v4.8 512 prompt 4 diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 27b8263d82..3722502311 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -15,7 +15,7 @@ true Debug;Release;Debug_NetCore;Release_NetCore false - 7 + 7.3 IDE1006 @@ -26,7 +26,7 @@ - net45 + net48 @@ -51,7 +51,7 @@ - + @@ -73,7 +73,7 @@ - + diff --git a/build.cake b/build.cake index 13e0d67a02..60dd88baf0 100644 --- a/build.cake +++ b/build.cake @@ -8,7 +8,7 @@ using System.Text.RegularExpressions; using Semver; var buildNetCore = "net7.0"; -var buildNetFramework = "net45"; +var buildNetFramework = "net48"; var target = Argument("target", "Default"); var configuration = Argument("configuration", "Debug");