From 3045910536b914129ff2e6a02a17c40687f49586 Mon Sep 17 00:00:00 2001 From: Ryan T Grange Date: Fri, 24 Apr 2020 22:32:43 -0700 Subject: [PATCH] Issue 46: Switch netcoreapp2 to netstandard2 for libraries. Removed unused using that required netcoreapp3.1. Fixed string to char. Added .NETStandard2.0 dependency to nuspec. --- .gitignore | 1 + Algorithms/Algorithms.csproj | 2 +- Algorithms/Numeric/SieveOfAtkin.cs | 1 - DataStructures/Common/PrimesList.cs | 2 +- DataStructures/DataStructures.csproj | 2 +- Nuget/c-sharp-algorithms.nuspec | 3 +++ 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c66e3377..5c4a7e47 100644 --- a/.gitignore +++ b/.gitignore @@ -161,6 +161,7 @@ ClientBin/ *.pfx *.publishsettings node_modules/ +*.nupkg # RIA/Silverlight projects Generated_Code/ diff --git a/Algorithms/Algorithms.csproj b/Algorithms/Algorithms.csproj index 28974149..aaab4631 100644 --- a/Algorithms/Algorithms.csproj +++ b/Algorithms/Algorithms.csproj @@ -1,6 +1,6 @@  - netcoreapp2.0 + netstandard2.0 diff --git a/Algorithms/Numeric/SieveOfAtkin.cs b/Algorithms/Numeric/SieveOfAtkin.cs index 3c679505..c38ff649 100644 --- a/Algorithms/Numeric/SieveOfAtkin.cs +++ b/Algorithms/Numeric/SieveOfAtkin.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Reflection.Metadata.Ecma335; using System.Threading.Tasks; /*** diff --git a/DataStructures/Common/PrimesList.cs b/DataStructures/Common/PrimesList.cs index 82842c68..85d496e7 100644 --- a/DataStructures/Common/PrimesList.cs +++ b/DataStructures/Common/PrimesList.cs @@ -225,7 +225,7 @@ private static string[] _readResource(string resourceName) { using (var stream = typeof(PrimesList).GetTypeInfo().Assembly.GetManifestResourceStream(resourceName)) using (var reader = new StreamReader(stream ?? throw new InvalidOperationException("Failed to read resource"), Encoding.UTF8)) - return reader.ReadToEnd().Split("\n"); + return reader.ReadToEnd().Split('\n'); } catch (Exception ex) { diff --git a/DataStructures/DataStructures.csproj b/DataStructures/DataStructures.csproj index 0a534884..9d6e313d 100644 --- a/DataStructures/DataStructures.csproj +++ b/DataStructures/DataStructures.csproj @@ -1,6 +1,6 @@  - netcoreapp2.0 + netstandard2.0 diff --git a/Nuget/c-sharp-algorithms.nuspec b/Nuget/c-sharp-algorithms.nuspec index 77ef22f3..e6654bea 100644 --- a/Nuget/c-sharp-algorithms.nuspec +++ b/Nuget/c-sharp-algorithms.nuspec @@ -11,6 +11,9 @@ https://github.com/aalhour/C-Sharp-Algorithms images\icon.png Plug-and-play class-library project of standard Data Structures and Algorithms in C#. + + +