Validate custom build props inputs before starting builds#1434
Open
bmehta001 wants to merge 5 commits intomicrosoft:mainfrom
Open
Validate custom build props inputs before starting builds#1434bmehta001 wants to merge 5 commits intomicrosoft:mainfrom
bmehta001 wants to merge 5 commits intomicrosoft:mainfrom
Conversation
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>
Contributor
There was a problem hiding this comment.
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.batandbuild-tests.cmdbefore 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/.targetsimport file (not aconfig-*.hheader).
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.
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>
Contributor
There was a problem hiding this comment.
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.
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.
Addresses #1255
Fail early when a custom build input is missing or is not an MSBuild import file.
Changes
.propsand.targetsinputs before startingbuild-all.batandbuild-tests.cmdbuild-win.ps1docs/building-custom-SKU.mdthat callers must pass the MSBuild import file, not theconfig-*.hheader directly