[release/v7.4.15] Move _GetDependencies MSBuild target from dynamic generation in build.psm1 into Microsoft.PowerShell.SDK.csproj#27144
Merged
adityapatwardhan merged 1 commit intoApr 3, 2026
Conversation
…ild.psm1` into `Microsoft.PowerShell.SDK.csproj` (PowerShell#27052) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com> Co-authored-by: Travis Plunk <travis.plunk@microsoft.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Backports the deterministic build fix from #27052 by relocating the _GetDependencies MSBuild target into the Microsoft.PowerShell.SDK project file and removing the runtime-generated .targets file creation from build.psm1, keeping TypeCatalog dependency collection stable and repo-controlled.
Changes:
- Add
_GetDependenciestarget directly tosrc/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj(with guidance comment). - Remove dynamic generation of
Microsoft.PowerShell.SDK.csproj.TypeCatalog.targetsfromStart-TypeGeninbuild.psm1. - Wrap
dotnet msbuildanddotnet runinStart-TypeGenwithStart-NativeExecutionfor consistent native-command error handling.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj | Defines _GetDependencies target in-source to avoid dynamically generated targets and keep dependency harvesting deterministic. |
| build.psm1 | Removes on-the-fly target file generation and uses Start-NativeExecution for dotnet invocations in Start-TypeGen. |
daxian-dbw
approved these changes
Apr 2, 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 #27052 to release/v7.4.15
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 _GetDependencies target into Microsoft.PowerShell.SDK.csproj and removes dynamic generation in build.psm1 so the release/v7.4.15 build path stays deterministic and aligned with main.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Cherry-pick applied cleanly on release/v7.4.15 with no merge conflicts. Backport PR CI will validate build and packaging flows for this branch.
Risk
REQUIRED: Check exactly one box.
Touches build generation logic and project file wiring, but the exact merged change from main was cherry-picked without manual edits, reducing divergence risk.