-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Describe the bug
What the bug is:
Task.WhenEach is not polyfilled by Polyfill on .NET Standard 2.0 and .NET Standard 2.1 even when Microsoft.Bcl.AsyncInterfaces is installed.
What I expected to happen:
To have Task.WhenEach polyfilled for any TFM before .NET 9, including .NET Standard 2.0 when the Microsoft.Bcl.AsyncInterfaces package is installed and .NET Standard 2.1 regardless of whether it is installed (2.1 and .NET Core 3.0+ don't need the Bcl AsyncInterfaces package) .
I believe it's related to this code specifically in the TaskWhenEachPolyfill.cs file:
#if !NET9_0_OR_GREATER && (NET5_0_OR_GREATER || NETCOREAPP3_0_OR_GREATER) && FeatureAsyncInterfacesAlso for what it's worth, Jetbrains Rider shows the Tests project doesn't seem to be using the local version of Polyfill but a version from NuGet instead. Running dotnet nuget why Polyfill on the Tests project doesn't reveal any usage so I don't know how accurate Rider is being in this case.
Minimal Repro
Minimal repro ZIP file
Submit a PR that fixes the bug
I've tried fixing it but have been unsuccessful to get it working on .NET Standard 2.0 thus far. I've created a draft PR with my progress in #482 . My fixes should in theory work on .NET Standard 2.1 but I haven't been able to test that.