feat(ir): add typed helper for MSBuild@1#1088
Draft
github-actions[bot] wants to merge 1 commit into
Draft
Conversation
Adds msbuild_step() factory function to src/compile/ir/tasks.rs for the MSBuild@1 ADO built-in task. The helper accepts the required solution path as a positional parameter and exposes all optional inputs (platform, configuration, msbuildArguments, clean, maximumCpuCount, restoreNugetPackages, msbuildLocationMethod, msbuildVersion, msbuildArchitecture, msbuildLocation, logProjectEvents, createLogFile, logFileVerbosity) via .with_input() on the returned TaskStep. Six unit tests cover: required-only construction, platform/configuration, msbuildArguments, optional boolean flags, explicit msbuild location, and .csproj project targets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Adds a typed factory function
msbuild_step()forMSBuild@1to the ado-aw IR tasks module.Motivation
Previously, any code that needed to emit an
MSBuild@1step had to hand-craftTaskStep::new("MSBuild@1", ...)with raw string inputs.MSBuild@1is the standard build tool for .NET Framework solutions and projects — filling a gap left bydot_net_core_cli_step(which targets cross-platform .NET Core / .NET 5+). This PR introduces a well-typed helper with a clear required/optional input boundary.Changes
src/compile/ir/tasks.rs:msbuild_step(solution)factory function with full doc-comment table of optional inputs, placed afterdocker_logout_step().src/compile/ir/tasks.rs(tests): Six new unit tests covering required-only construction,platform/configuration,msbuildArguments, optional boolean flags (clean,maximumCpuCount,restoreNugetPackages), explicit MSBuild location (msbuildLocationMethod = location), and.csprojproject targets.API
ADO Task Reference
MSBuild@1solution(path/glob to.slnor.*proj)platform,configuration,msbuildArguments,clean,maximumCpuCount,restoreNugetPackages,msbuildLocationMethod,msbuildVersion,msbuildArchitecture,msbuildLocation,logProjectEvents,createLogFile,logFileVerbosityValidation
cargo build --all-targetscargo test(6 new tests, all passing)cargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.