[release/v7.5.7] Externalize findMissingNotices target framework selection with ordered Windows fallback#27461
Merged
adityapatwardhan merged 2 commits intoMay 18, 2026
Conversation
…red Windows fallback (PowerShell#27269) Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: TravisEz13 <[email protected]> Co-authored-by: Travis Plunk <[email protected]>
47f2837 to
9736be5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Backport to release/v7.5.7 that moves tools/findMissingNotices.ps1 target framework selection into a repo-tracked JSON config and updates Windows behavior to pick the first matching configured Windows TFM (ordered), with fallback to the base target when available.
Changes:
- Added
tools/findMissingNotices.targets.jsonto definedotnetTargetNameand orderedwindowsTargetNames. - Updated
tools/findMissingNotices.ps1to load/validate the JSON config at script scope. - Updated Windows target selection to enumerate available targets from
project.assets.jsonand select the first configured match, with fallback behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/findMissingNotices.targets.json | Introduces config-driven base + Windows TFM candidates for notice harvesting. |
| tools/findMissingNotices.ps1 | Loads config and updates restore/target selection logic (including ordered Windows fallback). |
Comment on lines
+237
to
240
| $baseTargetName = $script:dotnetTargetName | ||
| $unixProjectName = 'powershell-unix' | ||
| $windowsProjectName = 'powershell-win-core' | ||
| $actualRuntime = $Runtime |
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "dotnetTargetName": "net9.0", | |||
| @@ -0,0 +1,5 @@ | |||
| { | |||
| "dotnetTargetName": "net9.0", | |||
| "windowsTargetNames": [ | |||
SeeminglyScience
approved these changes
May 18, 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.
Backport of #27269 to release/v7.5.7
Triggered by @adityapatwardhan on behalf of @app/copilot-swe-agent
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Moves target framework selection for findMissingNotices.ps1 to a repo-tracked JSON config, enabling easier updates and consistent Windows fallback logic. Removes hardcoded TFMs and legacy Win7 assumptions.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Cherry-pick applied with one conflict in tools/findMissingNotices.ps1, resolved by removing hardcoded TFM variables and using the new config-driven $baseTargetName logic. Verified branch commit and push succeeded.
Risk
REQUIRED: Check exactly one box.
Change is limited to build tooling and config, with no impact on runtime or customer-facing code. Maintains intended behavior for all supported platforms.
Merge Conflicts
Resolved conflict in tools/findMissingNotices.ps1 by removing hardcoded TFM assignments and using $baseTargetName per PR intent.