AZ-400 Practice Question: Design and implement build and release pipelines
Your pipeline uses the DotNetCoreCLI task to build a .NET Core application. You need to ensure that the build produces a self-contained deployment (SCD) for a Linux target. Which argument should you pass to the 'arguments' input of the task?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
--runtime linux-x64
The --runtime argument specifies the target runtime (linux-x64) and produces a self-contained deployment. Option A is wrong because --configuration specifies the build configuration, not the runtime. Option C is wrong because --output specifies the output directory, not the runtime. Option D is wrong because while --self-contained true is a valid argument, it does not specify the target runtime; to target Linux specifically, you must use --runtime linux-x64 (which implies self-contained) or combine --runtime with --self-contained true.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
--configuration Release
Why it's wrong here
--configuration Release specifies the build configuration (Debug/Release) to control compiler optimizations and symbol generation, but it has no effect on whether the resulting app is framework-dependent or self-contained. The deployment mode is determined by the presence of a runtime identifier (via --runtime) and the SelfContained property, not by the configuration.
- ✓
--runtime linux-x64
Why this is correct
The --runtime flag, along with --self-contained true in the project file, produces a self-contained deployment for the specified runtime.
- ✗
--output $(Build.ArtifactStagingDirectory)
Why it's wrong here
--output $(Build.ArtifactStagingDirectory) designates the directory where the publish outputs are copied, which is useful for staging artifacts before uploading them from the pipeline. However, it merely sets the destination path; it does not switch the publish mode to self-contained. Only combining --runtime linux-x64 with a SelfContained property (or a PublishProfile) changes the deployment mode.
- ✗
--self-contained true
Why it's wrong here
--self-contained is not a valid dotnet publish argument; it's a property in the project file.
Go deeper
Related to this question
Learn chapter
Designing a Build Pipeline
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
Key term
Task
A Task in Azure DevOps is a predefined, reusable step that performs a specific action during a build or release pipeline, like compiling code or running tests.
About these practice questions
This AZ-400 question is part of Courseiva's 823-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.