Skip to content

[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 into
PowerShell:release/v7.4.15from
adityapatwardhan:backport/release/v7.4.15/27052-569eb7246
Apr 3, 2026
Merged

[release/v7.4.15] Move _GetDependencies MSBuild target from dynamic generation in build.psm1 into Microsoft.PowerShell.SDK.csproj#27144
adityapatwardhan merged 1 commit into
PowerShell:release/v7.4.15from
adityapatwardhan:backport/release/v7.4.15/27052-569eb7246

Conversation

@adityapatwardhan
Copy link
Copy Markdown
Member

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

  • Required tooling change
  • Optional tooling change (include reasoning)

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

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

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.

  • High
  • Medium
  • Low

Touches build generation logic and project file wiring, but the exact merged change from main was cherry-picked without manual edits, reducing divergence risk.

…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>
@adityapatwardhan adityapatwardhan requested a review from a team as a code owner April 1, 2026 23:35
@adityapatwardhan adityapatwardhan added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 1, 2026
Copilot AI review requested due to automatic review settings April 1, 2026 23:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 _GetDependencies target directly to src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj (with guidance comment).
  • Remove dynamic generation of Microsoft.PowerShell.SDK.csproj.TypeCatalog.targets from Start-TypeGen in build.psm1.
  • Wrap dotnet msbuild and dotnet run in Start-TypeGen with Start-NativeExecution for 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.

@adityapatwardhan adityapatwardhan merged commit 2a72ba4 into PowerShell:release/v7.4.15 Apr 3, 2026
44 checks passed
@adityapatwardhan adityapatwardhan deleted the backport/release/v7.4.15/27052-569eb7246 branch April 3, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants