Skip to content

[release/v7.5] Fix build to only enable ready-to-run for the Release configuration#26795

Closed
daxian-dbw wants to merge 1 commit into
PowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26290-b0507ca4c
Closed

[release/v7.5] Fix build to only enable ready-to-run for the Release configuration#26795
daxian-dbw wants to merge 1 commit into
PowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26290-b0507ca4c

Conversation

@daxian-dbw

Copy link
Copy Markdown
Member

Backport of #26290 to release/v7.5

Triggered by @daxian-dbw on behalf of @daxian-dbw

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)

Customer Impact

  • Customer reported
  • Found internally

Issue found internally during development - ready-to-run was being enabled even for Debug configuration, making it impossible to debug code.

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

The fix was tested by building PowerShell in Debug configuration and verifying that ready-to-run is not enabled, allowing proper debugging. Release builds continue to have ready-to-run enabled.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

This change adds proper configuration conditions to only enable ready-to-run for Release builds, while leaving Debug builds unchanged. This makes debugging possible again without affecting release builds.

Merge Conflicts

Resolved conflict in PowerShell.Common.props by accepting the new structure that conditionally enables ready-to-run only for Release configuration.

@daxian-dbw daxian-dbw requested a review from a team as a code owner February 12, 2026 19:40
@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 12, 2026
Copilot AI review requested due to automatic review settings February 12, 2026 19:40
@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Feb 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Backport to release/v7.5 intended to ensure ReadyToRun is only enabled for Release builds (so Debug builds remain debuggable), by adding configuration-conditional MSBuild properties in PowerShell.Common.props.

Changes:

  • Add PublishReadyToRun / PublishReadyToRunEmitSymbols property groups conditioned on $(Configuration) == 'Release' for FxDependentDeployment and SelfContained deployments.
  • Adjust whitespace/formatting near the end of PowerShell.Common.props.

Comment thread PowerShell.Common.props
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' And '$(Configuration)' == 'Release' ">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
>>>>>>> b0507ca4c (Fix build to only enable ready-to-run for the Release configuration (#26290))

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

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

There is an unresolved merge conflict marker (>>>>>>> ...) in the file, which makes the MSBuild props invalid XML and will break builds. Resolve the conflict and remove the marker, keeping only the intended PropertyGroup block(s).

Suggested change
>>>>>>> b0507ca4c (Fix build to only enable ready-to-run for the Release configuration (#26290))

Copilot uses AI. Check for mistakes.
Comment thread PowerShell.Common.props
Comment on lines +213 to +221
</PropertyGroup>

<!-- Enable ready-to-run only for Release configuration -->
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' And '$(Configuration)' == 'Release' ">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
>>>>>>> b0507ca4c (Fix build to only enable ready-to-run for the Release configuration (#26290))
</PropertyGroup>

Copilot AI Feb 12, 2026

Copy link

Choose a reason for hiding this comment

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

This stray </PropertyGroup> appears without a matching opening tag in the surrounding context, which will also invalidate the props file. After resolving the conflict, ensure all <PropertyGroup> elements are properly balanced and nested.

Suggested change
</PropertyGroup>
<!-- Enable ready-to-run only for Release configuration -->
<PropertyGroup Condition=" '$(AppDeployment)' == 'SelfContained' And '$(Configuration)' == 'Release' ">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
>>>>>>> b0507ca4c (Fix build to only enable ready-to-run for the Release configuration (#26290))
</PropertyGroup>

Copilot uses AI. Check for mistakes.
@daxian-dbw daxian-dbw closed this Feb 12, 2026
@daxian-dbw daxian-dbw deleted the backport/release/v7.5/26290-b0507ca4c branch February 12, 2026 22:38
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.

2 participants