Skip to content

Unset InsertPackagePropsValues when irrelevant - #12810

Merged
YuliiaKovalova merged 1 commit into
mainfrom
exp/raines/unset-InsertPackagePropsValues-when-relevant
Nov 24, 2025
Merged

YuliiaKovalova merged 1 commit into
mainfrom
exp/raines/unset-InsertPackagePropsValues-when-relevant

Conversation

@rainersigwald

Copy link
Copy Markdown
Member

When the insertion is not updating .props files, explicitly unset InsertPackagePropsValues to empty, to avoid errors parsing the literal string $(InsertPackagePropsValues) like

##[error]Cannot insert payload: $(InsertPackagePropsValues) does not match the pattern 'packageId=version[,...]'.

Test insertion: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=12819912

When the insertion is not updating .props files, explicitly unset
`InsertPackagePropsValues` to empty, to avoid errors parsing the literal
string `$(InsertPackagePropsValues)` like

    ##[error]Cannot insert payload: $(InsertPackagePropsValues) does not match the pattern 'packageId=version[,...]'.
Copilot AI review requested due to automatic review settings November 21, 2025 22:16
@rainersigwald rainersigwald added the Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. label Nov 21, 2025

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

This PR fixes an error that occurs during VS insertions when the InsertPackagePropsValues variable is not explicitly set. The error happens when the literal string $(InsertPackagePropsValues) is passed to the insertion task and fails pattern validation. The fix explicitly unsets the variable to an empty string for branches that don't require .props file updates.

Key changes:

  • Added an else block to explicitly unset InsertPackagePropsValues when not updating .props files for target branches
  • Minor comment update changing "As of 18.0" to "For 18.0+" for clarity

Comment thread azure-pipelines/vs-insertion.yml Resolved
@YuliiaKovalova
YuliiaKovalova merged commit 92198f5 into main Nov 24, 2025
@YuliiaKovalova
YuliiaKovalova deleted the exp/raines/unset-InsertPackagePropsValues-when-relevant branch November 24, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants