MoreLINQ
MoreLINQ copied to clipboard
ToHashSet has been superseded in .NET Core 2.0+, .NET Framework 4.7.1+
The base .Net framework, starting in .Net Framework 4.7.1, and .Net Core 2.0, includes its own IEnumerable extension method, .ToHashSet(). It should be removed from MoreLinq with a compiler flag for 4.7.1+ and Core 2.0+. Currently, it's easy to end up in a place where you can't compile if you have using statements for both System.Linq
and MoreLinq
.
https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.tohashset?view=netframework-4.8
Proposed fix.
#739
@b9chris
It seems as this should be fixed with #945 , but I am still getting an error. Is the error re-introduced, or was it never realeased or am I simply doing something wrong?
/cc @viceroypenguin @atifaziz
Also getting this error, any solutions?
Looks like MoreLinq is being compiled for netstandard 2.0 and netstandard 2.1, and not for netfx 4.7.2+. As such, when referenced by netfx 4.8, it uses the netstandard 2.0 dll, which does not exclude ToHashSet()
(since ns20 does not include that method by default).
MoreLinq deployment will need to be updated to include a netfx 472 dll for proper operation here. As I am not a maintainer on this project, I cannot assist any further.