Skip to content

Commit

Permalink
Fix build issues regarding library mismatches.
Browse files Browse the repository at this point in the history
  • Loading branch information
unquietwiki committed Feb 19, 2023
1 parent af5d512 commit a177264
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 32 deletions.
17 changes: 10 additions & 7 deletions CKAN.sln
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Cmdline/Action/Prompt.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Reflection;
using System.Linq;
using System.Collections.Generic;
Expand Down Expand Up @@ -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<OptionAttribute>()?.LongName)
Expand Down
4 changes: 2 additions & 2 deletions Cmdline/CKAN-cmdline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.9.4" />
<PackageReference Include="CommandLineParser" Version="1.9.71" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="ReadLine" Version="1.2.0" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="System.Linq" Version="4.3.0" />
<PackageReference Include="CommandLineParser" Version="1.9.71" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
5 changes: 1 addition & 4 deletions Core/CKAN-core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.9.4" />
<PackageReference Include="ChinhDo.Transactions.FileManager" Version="1.2.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="NJsonSchema" Version="10.8.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
Expand All @@ -52,8 +51,6 @@
<PackageReference Include="ChinhDo.Transactions.FileManager" Version="1.2.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="System.Security.Permissions" Version="4.7.0" />
<PackageReference Include="TxFileManager.NETStandard" Version="2.0.0" />
</ItemGroup>
Expand Down
17 changes: 9 additions & 8 deletions Core/Extensions/EnumerableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ public static ICollection<T> AsCollection<T>(this IEnumerable<T> source)
return source is ICollection<T> collection ? collection : source.ToArray();
}

#if NET45
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> 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<T> ToHashSet<T>(this IEnumerable<T> source)
{
if (source == null)
throw new ArgumentNullException(nameof(source));
return new HashSet<T>(source);
}
#endif
return new HashSet<T>(source);
}
#endif */

public static IEnumerable<T> Memoize<T>(this IEnumerable<T> source)
{
Expand Down
9 changes: 7 additions & 2 deletions GUI/CKAN-GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac" Version="4.9.4" />
<PackageReference Include="ini-parser" Version="3.4.0" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.CSharp">
<Version>4.7.0</Version>
Expand All @@ -50,6 +49,12 @@
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<PackageReference Include="ini-parser" Version="2.5.2" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="ini-parser-netstandard" Version="2.5.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -1426,4 +1431,4 @@
<Exec Command="powershell ../build.ps1 Generate-GlobalAssemblyVersionInfo" Condition="!Exists('../_build/meta/GlobalAssemblyVersionInfo.cs') And '$(OS)' == 'Windows_NT'" />
<Exec Command="sh ../build Generate-GlobalAssemblyVersionInfo" Condition="!Exists('../_build/meta/GlobalAssemblyVersionInfo.cs') And '$(OS)' == 'Unix'" />
</Target>
</Project>
</Project>
6 changes: 3 additions & 3 deletions Netkan/CKAN-netkan.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
<PackageReference Include="Autofac" Version="4.9.4" />
<PackageReference Include="AWSSDK.Core" Version="3.7.105.6" />
<PackageReference Include="AWSSDK.SQS" Version="3.7.100.77" />
<PackageReference Include="CommandLineParser" Version="1.9.71" />
<PackageReference Include="Microsoft.CSharp">
<Version>4.7.0</Version>
</PackageReference>
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Namotion.Reflection" Version="2.1.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="System.Linq">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="CommandLineParser" Version="1.9.71" />
<PackageReference Include="YamlDotNet" Version="13.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -189,4 +189,4 @@
<Exec Command="powershell ../build.ps1 Generate-GlobalAssemblyVersionInfo" Condition="!Exists('../_build/meta/GlobalAssemblyVersionInfo.cs') And '$(OS)' == 'Windows_NT'" />
<Exec Command="sh ../build Generate-GlobalAssemblyVersionInfo" Condition="!Exists('../_build/meta/GlobalAssemblyVersionInfo.cs') And '$(OS)' == 'Unix'" />
</Target>
</Project>
</Project>
10 changes: 6 additions & 4 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<ItemGroup>
<PackageReference Include="Castle.Core" Version="4.4.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="SharpZipLib" Version="1.4.2" />
<PackageReference Include="SharpZipLib" Version="1.3.3" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
Expand All @@ -53,15 +53,17 @@
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="CommandLineParser.DotNetStandard" Version="1.9.71" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="CommandLineParser" Version="1.9.71" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\_build\meta\GlobalAssemblyVersionInfo.cs">
Expand Down

0 comments on commit a177264

Please sign in to comment.