Fix ManualResetValueTaskSourceCore polyfill missing on netstandard2.0#115
Merged
Fix ManualResetValueTaskSourceCore polyfill missing on netstandard2.0#115
Conversation
…dard2.0 with Extensions package Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/b900dff5-29a3-4bbf-8cde-e7af84a51fcb Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Tyrrrz
April 17, 2026 09:02
View session
Tyrrrz
reviewed
Apr 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes PolyShim’s feature detection so FEATURE_VALUETASK_SOURCES_MANUALRESET is not enabled for netstandard2.0 just because System.Threading.Tasks.Extensions is referenced, preventing missing-type build failures when the polyfill is incorrectly suppressed.
Changes:
- Tighten
FeatureValueTaskSourcesManualResetconditions to only enable on native availability (netcoreapp/netstandard ≥ 2.1) and update the explanatory comment. - Regenerate/update
Signatures.mdto reflect additional detected polyfills/signatures (counts and new entries).
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Signatures.md | Updates the generated signature inventory (counts + new entries). |
| PolyShim/PolyShim.targets | Adjusts the MSBuild feature-flag logic so ManualResetValueTaskSourceCore<T> isn’t assumed present on netstandard2.0 via System.Threading.Tasks.Extensions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…URE flag from targets Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/ef87e581-44e0-4187-a9c5-80c5fe71096f Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Tyrrrz
reviewed
Apr 17, 2026
Copilot
AI
changed the title
Fix FEATURE_VALUETASK_SOURCES_MANUALRESET incorrectly enabled on netstandard2.0
Fix ManualResetValueTaskSourceCore polyfill missing on netstandard2.0
Apr 17, 2026
…er feedback Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/45d3fa69-f2f8-4bdd-86eb-5cabd88d5ec0 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/70ab210a-1b88-4e78-9545-e909fc6adfe7 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Tyrrrz
approved these changes
Apr 17, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## prime #115 +/- ##
==========================================
+ Coverage 90.66% 90.69% +0.02%
==========================================
Files 282 282
Lines 4898 4898
Branches 401 401
==========================================
+ Hits 4441 4442 +1
+ Misses 367 366 -1
Partials 90 90 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ManualResetValueTaskSourceCore<T>is not present in thenetstandard2.0DLL ofSystem.Threading.Tasks.Extensions— onlyIValueTaskSource<T>,ValueTaskSourceStatus, andValueTaskSourceOnCompletedFlagsare. The type exists natively only in .NET Core 2.1+ / .NET Standard 2.1+. WhenSystem.Threading.Tasks.Extensionswas transitively referenced (e.g. viaMicrosoft.CodeAnalysis.CSharp), PolyShim incorrectly suppressed its ownManualResetValueTaskSourceCore<T>polyfill, causing a missing-type build failure in consumers.Changes
PolyShim/PolyShim.targets: Removed theFEATURE_VALUETASK_SOURCES_MANUALRESETflag entirely — since availability is purely TFM-based (no package reference check involved), there is no need for a build flag.PolyShim/NetCore21/ManualResetValueTaskSourceCore.cs: Replaced the removed feature flag guard with an inline TFM check following the same pattern as other polyfill files:#if (NETCOREAPP && !NETCOREAPP2_1_OR_GREATER) || (NETFRAMEWORK) || (NETSTANDARD && !NETSTANDARD2_1_OR_GREATER), with a nested#if FEATURE_TASKguard to exclude older .NET Framework targets (e.g. net35) whereTaskis not available. An inline comment explains that the compatibility package does not provide this type fornetstandard2.0or .NET Framework targets. The now-unreachable inner#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_0_OR_GREATERbranch insideOnCompletedwas also removed.