feat(ir): add typed helper for DotNetCoreCLI@2#1025
Merged
jamesadevine merged 1 commit intoJun 15, 2026
Conversation
Adds `dot_net_core_cli_step(command)` to `src/compile/ir/tasks.rs`.
The function takes the required `command` input ("build", "test",
"publish", "restore", "pack", "run", "push", or "custom") and
returns a `TaskStep` pre-configured with a display name of
"dotnet <command>". All other inputs (projects, arguments,
workingDirectory, publishTestResults, etc.) are applied via the
existing `.with_input(…)` builder pattern.
Includes four unit tests covering build, test, publish, and all
supported command variants.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 15, 2026
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 for
DotNetCoreCLI@2to the ado-aw IR, following the established pattern insrc/compile/ir/tasks.rs.Motivation
Previously, any compiler code that needed to emit a
DotNetCoreCLI@2step had to hand-craftTaskStep::new("DotNetCoreCLI@2", ...)with raw string inputs. This PR introduces a well-typeddot_net_core_cli_step()helper that:command) explicit at the call sitecopy_files_step,docker_installer_step, andpublish_test_results_stepChanges
src/compile/ir/tasks.rs:dot_net_core_cli_step(command)factory function with full doc comment covering all 11 optional inputs and their command applicabilitysrc/compile/ir/tasks.rs: 4 unit tests covering build, test with optional inputs, publish with optional inputs, and all 8 supported commandsdot_net_core_cli_stepsignatureDisplay name is set to
"dotnet <command>"(e.g."dotnet build","dotnet test"). Optional inputs are applied via.with_input(...):projectsargumentsworkingDirectorypublishTestResults"true"testRunTitlezipAfterPublish"true"modifyOutputPath"true"publishWebProjects"true"custompackagesToPush"$(Build.ArtifactStagingDirectory)/*.nupkg"packagesToPack"**/*.csproj"ADO Task Reference
DotNetCoreCLI@2commandprojects,arguments,workingDirectory,publishTestResults,testRunTitle,zipAfterPublish,modifyOutputPath,publishWebProjects,custom,packagesToPush,packagesToPack, and othersValidation
cargo build --all-targets— cleancargo test— 1982 tests pass (4 new fordot_net_core_cli_step), 0 failurescargo clippy --all-targets --all-features --workspace -- -D warnings— pre-existing failure insource_path_guard.rs(unrelated to this PR; exists onmain)Created 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.