AZ-400 Practice Question: Design and implement build and release pipelines
A team uses Azure Pipelines to build a .NET application. The build takes 30 minutes, and developers complain that the pipeline runs slowly. The pipeline uses the 'windows-latest' agent and installs the .NET SDK in each run. Which action would MOST reduce the build time?
⚠ Common exam trap
Candidates often confuse reducing build time with scaling resources (parallel jobs or self-hosted agents) instead of recognizing that eliminating redundant work (SDK installation) via caching directly shortens the pipeline duration.
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
✓
Enable pipeline caching for the .NET SDK.
Enabling pipeline caching for the .NET SDK allows the SDK to be restored from a cache instead of being downloaded and installed on every run. This eliminates the recurring overhead of SDK installation, which is a significant portion of the 30-minute build time, directly addressing the slow pipeline complaint.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Enable pipeline caching for the .NET SDK.
Why this is correct
Enabling pipeline caching for the .NET SDK stores the downloaded SDK and NuGet packages in a shared cache, so subsequent pipeline runs can reuse them instead of re-downloading and re-extracting the SDK from the network. This directly reduces the repetitive setup time that dominates the pipeline's build time, especially when the project specifies a pinned SDK version.
- ✗
Deploy a self-hosted agent in Azure.
Why it's wrong here
Deploying a self-hosted agent in Azure does not eliminate the need to download or install the .NET SDK; unless you pre-install it or add caching, the agent will still retrieve the SDK on every job. A self-hosted agent can help with other performance factors, but it does not reduce the SDK download overhead that is the actual bottleneck here.
- ✗
Increase the number of parallel jobs.
Why it's wrong here
Increasing the number of parallel jobs increases the number of pipeline runs you can execute concurrently, but it does not accelerate a single build's execution because the steps within a job are still sequential. The SDK download and restore/build steps in this one pipeline are not parallelized by having more agents, so overall elapsed time for that individual build remains unchanged.
- ✗
Change the agent pool to 'ubuntu-latest'.
Why it's wrong here
Switching the agent pool to 'ubuntu-latest' changes the host operating system but does not address how the .NET SDK is provisioned; hosted images still install the SDK on demand or via setup tasks, which incurs the same download overhead. In fact, ubuntu-latest may not include the exact SDK version required, triggering an additional installation step rather than saving time.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Azure Pipelines
Azure Pipelines is a cloud-based CI/CD service from Microsoft that automatically builds, tests, and deploys code to any platform or cloud.
Key term
Agent
An agent is a software component that runs on a local machine to perform automated tasks, collect data, or execute commands as part of a larger system like CI/CD or monitoring.
About these practice questions
One of 823 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.