Allow custom binlog names in common build scripts#16856
Open
Copilot wants to merge 3 commits into
Open
Conversation
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/ce64dfe8-f0c3-4d1e-a8c4-d86622772957 Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dotnet/arcade/sessions/ce64dfe8-f0c3-4d1e-a8c4-d86622772957 Co-authored-by: mmitche <8725170+mmitche@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update build.ps1 to allow specification of binlog name
Allow custom binlog names in common build scripts
May 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Arcade’s common build entrypoints (eng/common/build.sh and eng/common/build.ps1) to allow callers to specify a custom MSBuild binlog file name/path so sequential build steps don’t overwrite Build.binlog, while preserving the existing default output location and behavior.
Changes:
- Add
--binaryLogName/-binaryLogName(alias-bln) to specify a binlog file name or path and implicitly enable binary logging. - Resolve relative binlog paths under the existing log directory and pass absolute paths through unchanged.
- Ensure the target directory for the binlog is created before invoking MSBuild.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/common/build.sh | Adds --binaryLogName arg parsing and custom /bl: path selection for MSBuild. |
| eng/common/build.ps1 | Adds -binaryLogName parameter and computes/creates the custom binlog path when binary logging is enabled. |
Comment on lines
240
to
+252
| local bl="" | ||
| if [[ "$binary_log" == true ]]; then | ||
| bl="/bl:\"$log_dir/Build.binlog\"" | ||
| local binary_log_path="" | ||
| if [[ -z "$binary_log_name" ]]; then | ||
| binary_log_path="$log_dir/Build.binlog" | ||
| elif [[ "$binary_log_name" = /* ]]; then | ||
| binary_log_path="$binary_log_name" | ||
| else | ||
| binary_log_path="$log_dir/$binary_log_name" | ||
| fi | ||
|
|
||
| mkdir -p "$(dirname "$binary_log_path")" | ||
| bl="/bl:\"$binary_log_path\"" |
Member
|
@MichaelSimons This is to fix an issue in sdk's CI that prevents analysis of the build binlogs because the second build step (full framework build) overwerites the Build.binlog of the original build step. |
Open
3 tasks
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.
Sequential build steps using
eng/common/build.ps1andeng/common/build.shalways wrote toBuild.binlog, so later steps overwrote earlier logs. This updates the common entrypoints to let callers choose the binlog file name or path while preserving the existing default.Surface area
-binaryLogName/--binaryLogNamewith short form-blnto the common PowerShell and Bash build scripts.-binaryLog/--binaryLogbehavior unchanged.Behavior
artifacts/log/<Configuration>/Build.binlog.Example
To double check: