Conversation
…s in PolyShim.targets Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace project dependency checks in .targets file
Replace Reference/PackageDependencies feature checks with ReferencePath filename checks
Mar 2, 2026
Owner
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #87 +/- ##
==========================================
- Coverage 85.37% 85.31% -0.06%
==========================================
Files 220 220
Lines 3603 3603
Branches 314 314
==========================================
- Hits 3076 3074 -2
- Misses 455 457 +2
Partials 72 72 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates PolyShim’s MSBuild feature-detection logic to use resolved references rather than separate Reference + PackageDependencies identity checks, simplifying how feature flags are determined during the build.
Changes:
- Replaced paired
@(Reference)/@(PackageDependencies)Identitychecks with a single@(ReferencePath)Filenamecheck per dependency. - Kept multi-assembly feature detection (e.g., HashCode/HttpClient/Task) as multiple conditions, but migrated each to the new
ReferencePathapproach.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The
.targetsfile was using two MSBuild item group checks per assembly (Reference+PackageDependenciesbyIdentity) to detect whether a dependency is present. This replaces both with a singleReferencePathcheck byFilenamemetadata.Closes #88
Changes
PolyShim/PolyShim.targets: For every feature, removed the pairedReference/PackageDependenciesidentity checks and replaced with a singleReferencePathfilename check:Features that previously checked two assemblies (e.g.
FeatureHashCodechecking bothSystem.HashCodeandMicrosoft.Bcl.HashCode,FeatureHttpClient,FeatureTask) retain two conditions — one per assembly — but each now usesReferencePath/Filenamerather than the old pair pattern.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.