From 50d85e12c418cf1d9bafc7668a3ceb3ee338a3a5 Mon Sep 17 00:00:00 2001 From: Michael Adams Date: Sat, 18 Feb 2023 16:14:31 -0800 Subject: [PATCH] Fix build issues regarding library mismatches. --- CKAN.sln | 17 ++++++++++------- Cmdline/Action/Prompt.cs | 4 ++-- Cmdline/CKAN-cmdline.csproj | 4 ++-- Core/CKAN-core.csproj | 5 +---- Core/Extensions/EnumerableExtensions.cs | 17 +++++++++-------- GUI/CKAN-GUI.csproj | 4 ++-- Netkan/CKAN-netkan.csproj | 6 +++--- Tests/Tests.csproj | 10 ++++++---- 8 files changed, 35 insertions(+), 32 deletions(-) diff --git a/CKAN.sln b/CKAN.sln index d733f4d59a..672881118a 100644 --- a/CKAN.sln +++ b/CKAN.sln @@ -1,21 +1,21 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30225.117 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.33402.96 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-core", "Core\CKAN-core.csproj", "{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CKAN-core", "Core\CKAN-core.csproj", "{3B9AEA22-FA3B-4E43-9283-EABDD81CF271}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-autoupdate", "AutoUpdate\CKAN-autoupdate.csproj", "{E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CKAN-autoupdate", "AutoUpdate\CKAN-autoupdate.csproj", "{E5B1C768-349E-4DAF-A134-56E4ECF1EEEF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-cmdline", "Cmdline\CKAN-cmdline.csproj", "{E97D81F6-85E2-4F1F-906D-BE21766602E5}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CKAN-cmdline", "Cmdline\CKAN-cmdline.csproj", "{E97D81F6-85E2-4F1F-906D-BE21766602E5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-ConsoleUI", "ConsoleUI\CKAN-ConsoleUI.csproj", "{DA5C7023-9A3B-4204-AE2F-BBA6C388B436}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CKAN-ConsoleUI", "ConsoleUI\CKAN-ConsoleUI.csproj", "{DA5C7023-9A3B-4204-AE2F-BBA6C388B436}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-GUI", "GUI\CKAN-GUI.csproj", "{A79F9D54-315C-472B-928F-713A5860B2BE}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CKAN-netkan", "Netkan\CKAN-netkan.csproj", "{4336F356-33DB-442A-BF74-5E89AF47A5B9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{4F41255E-8BC1-465B-82D5-1C5665BC099A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{4F41255E-8BC1-465B-82D5-1C5665BC099A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -75,6 +75,9 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F1CF2029-80B8-41D0-97E9-0403923F85BE} + EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution Policies = $0 $0.TextStylePolicy = $1 diff --git a/Cmdline/Action/Prompt.cs b/Cmdline/Action/Prompt.cs index b9cd803636..33ac7192bf 100644 --- a/Cmdline/Action/Prompt.cs +++ b/Cmdline/Action/Prompt.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Reflection; using System.Linq; using System.Collections.Generic; @@ -111,7 +111,7 @@ private string[] GetSuggestions(string text, int index) : null; } - private string[] GetOptions(TypeInfo ti, string prefix) + private string[] GetOptions(System.Reflection.TypeInfo ti, string prefix) { return ti.DeclaredProperties .Select(p => p.GetCustomAttribute()?.LongName) diff --git a/Cmdline/CKAN-cmdline.csproj b/Cmdline/CKAN-cmdline.csproj index 4e0347d18e..a1d9212451 100644 --- a/Cmdline/CKAN-cmdline.csproj +++ b/Cmdline/CKAN-cmdline.csproj @@ -24,13 +24,13 @@ - - + + diff --git a/Core/CKAN-core.csproj b/Core/CKAN-core.csproj index 00d8a5c57b..b1e38b0fbf 100644 --- a/Core/CKAN-core.csproj +++ b/Core/CKAN-core.csproj @@ -39,10 +39,9 @@ - - + @@ -52,8 +51,6 @@ - - diff --git a/Core/Extensions/EnumerableExtensions.cs b/Core/Extensions/EnumerableExtensions.cs index 3c5c7752bf..6bc4ca46d5 100644 --- a/Core/Extensions/EnumerableExtensions.cs +++ b/Core/Extensions/EnumerableExtensions.cs @@ -15,15 +15,16 @@ public static ICollection AsCollection(this IEnumerable source) return source is ICollection collection ? collection : source.ToArray(); } -#if NET45 - public static HashSet ToHashSet(this IEnumerable source) - { - if (source == null) - throw new ArgumentNullException(nameof(source)); + // This wasn't being used in the 4.7.2 build, and conflicts with LINQ otherwise. + /* #if NET45 + public static HashSet ToHashSet(this IEnumerable source) + { + if (source == null) + throw new ArgumentNullException(nameof(source)); - return new HashSet(source); - } -#endif + return new HashSet(source); + } + #endif */ public static IEnumerable Memoize(this IEnumerable source) { diff --git a/GUI/CKAN-GUI.csproj b/GUI/CKAN-GUI.csproj index 892d5d4219..140fb533df 100644 --- a/GUI/CKAN-GUI.csproj +++ b/GUI/CKAN-GUI.csproj @@ -40,7 +40,6 @@ - 4.7.0 @@ -49,6 +48,7 @@ 4.3.0 + @@ -1426,4 +1426,4 @@ - \ No newline at end of file + diff --git a/Netkan/CKAN-netkan.csproj b/Netkan/CKAN-netkan.csproj index 1f978005fa..b06fe41045 100644 --- a/Netkan/CKAN-netkan.csproj +++ b/Netkan/CKAN-netkan.csproj @@ -43,17 +43,17 @@ - 4.7.0 - + 4.3.0 + @@ -189,4 +189,4 @@ - \ No newline at end of file + diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 56feb63796..99bc951334 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -44,7 +44,7 @@ - + @@ -53,15 +53,17 @@ + + + + - - - +