[PR #2168] Create bx.cmd #24849

Open
opened 2026-01-31 09:05:43 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/2168

State: closed
Merged: Yes


Summary of the Pull Request

Adds a bx script that only builds the project in your current directory (and all the project's dependencies).

Detailed Description of the Pull Request / Additional comments

When we were in Windows, bz behaved a lot more like this, because obviously you don't want to build all of Windows when just working on the Console. However, when we moved the console to MsBuild, the solution only took like 4s to build, so we never bothered with creating a script to build a single project.

However, the Terminal projects take a very long time to build. So rebuilding the entire solution from the commandline became increasingly painful. This change should alleviate that pain. Hopefully quickly iterating on code in the Console codebase should be much more manageable with this change.

Building a single project in a solution is a little tricky however. You need to supply the target name to msbuild.exe, which is not as simple as just the Project's name or path. So we need to parse the sln's .metaproj file to correlate vcxproj file to target name. That's what bx.ps1 is for.

This change could use some extra love - generating the metaproj takes a little while, as does parsing it. There might be a way to only generate the metaproj if it's changed, I didn't really investigate this, but presumably it could be done with a powershell script. I'll leave that for another work item in the future. It's still much faster to build with bx than before, but it could be faster.

Validation Steps Performed

Built the thing using bx and bcx.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/2168 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Adds a `bx` script that **only** builds the project in your current directory (and all the project's dependencies). <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments When we were in Windows, `bz` behaved a lot more like this, because obviously you don't want to build all of Windows when just working on the Console. However, when we moved the console to MsBuild, the solution only took like 4s to build, so we never bothered with creating a script to build a single project. However, the Terminal projects take a _very_ long time to build. So rebuilding the entire solution from the commandline became increasingly painful. This change should alleviate that pain. Hopefully quickly iterating on code in the Console codebase should be much more manageable with this change. Building a single project in a solution is a little tricky however. You need to supply the _target_ name to `msbuild.exe`, which is not as simple as just the Project's name or path. So we need to parse the sln's .metaproj file to correlate `vcxproj` file to target name. That's what `bx.ps1` is for. This change could use some extra love - generating the metaproj takes a little while, as does parsing it. There might be a way to only generate the metaproj _if it's changed_, I didn't really investigate this, but presumably it could be done with a powershell script. I'll leave that for another work item in the future. It's still much faster to build with `bx` than before, but _it could be faster_. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Built the thing using `bx` and `bcx`.
claunia added the pull-request label 2026-01-31 09:05:43 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24849