Skip to content

Validate custom build props inputs before starting builds#1434

Open
bmehta001 wants to merge 5 commits intomicrosoft:mainfrom
bmehta001:bhamehta/1255-validate-custom-props
Open

Validate custom build props inputs before starting builds#1434
bmehta001 wants to merge 5 commits intomicrosoft:mainfrom
bmehta001:bhamehta/1255-validate-custom-props

Conversation

@bmehta001
Copy link
Copy Markdown
Contributor

@bmehta001 bmehta001 commented May 2, 2026

Addresses #1255

Fail early when a custom build input is missing or is not an MSBuild import file.

Changes

  • validate .props and .targets inputs before starting build-all.bat and build-tests.cmd
  • add the same guard to build-win.ps1
  • clarify in docs/building-custom-SKU.md that callers must pass the MSBuild import file, not the config-*.h header directly

Reject missing or non-MSBuild custom props inputs before the build starts so callers get an explicit failure instead of a successful build that silently ignores the intended custom SKU settings.

Files changed:
- build-all.bat
- build-tests.cmd
- build-win.ps1
- docs/building-custom-SKU.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bmehta001 bmehta001 requested a review from a team as a code owner May 2, 2026 05:56
@bmehta001 bmehta001 requested a review from Copilot May 2, 2026 19:09
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

Adds early validation for “custom build props” inputs so Windows build scripts fail fast when a provided file is missing or not an MSBuild import file, addressing the pit-of-failure described in #1255.

Changes:

  • Validate custom props/targets inputs in build-all.bat and build-tests.cmd before starting the build.
  • Add equivalent validation (existence + extension) to build-win.ps1, resolving paths to absolute.
  • Update documentation to clarify that callers must pass an MSBuild .props/.targets import file (not a config-*.h header).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/building-custom-SKU.md Clarifies correct input type for build-all.bat custom build configuration.
build-win.ps1 Adds validation and path resolution for -customProps.
build-tests.cmd Validates custom props input (exists + .props/.targets) before running builds/tests.
build-all.bat Validates custom props input (exists + .props/.targets) before running builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread build-win.ps1
build-win.ps1 validated custom props paths but still routed msbuild through a single cmd /c string, so paths containing spaces could still break. Invoke msbuild with an argument array instead so ForceImportBeforeCppTargets survives normal Windows path quoting.

Files changed:
- build-win.ps1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bmehta001 bmehta001 self-assigned this May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants