Courseiva
Design and implement build and release pipelineshardMultiple SelectObjective-mapped

AZ-400 Practice Question: Design and implement build and release pipelines

Your organization uses Azure Pipelines with Microsoft-hosted agents. The pipeline runs a .NET Core application build. You notice that the build takes longer than expected. Which THREE actions can you take to improve build performance? (Choose three.)

⚠ Common exam trap

It's easy for candidates to confuse increasing parallel jobs (which affects concurrency) with optimizing a single pipeline's execution time, leading them to incorrectly select option C.

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 caching for NuGet packages.

Enabling NuGet package caching reduces build time by avoiding repeated downloads of packages. Using a self-hosted agent with pre-installed dependencies eliminates the need to install and download tools on each run, further reducing overhead. Additionally, structuring the pipeline as a multi-stage build and running tests in parallel across multiple agents can significantly shorten overall pipeline duration by executing independent test suites concurrently. Together, these optimizations improve build performance.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add more build steps to the pipeline.

    Why it's wrong here

    Adding more build steps introduces additional operations that must execute sequentially in the pipeline, increasing the total duration without resolving the underlying performance bottleneck. This lengthens build time rather than reducing it, so it is counterproductive to the goal of speeding up the build.

  • Enable caching for NuGet packages.

    Why this is correct

    Caching NuGet packages in Azure Pipelines stores restored packages in a local cache keyed by your package lock files, so subsequent builds restore them from the cache instead of downloading from nuget.org. This dramatically reduces restore time and network latency, directly shortening the overall build duration.

  • Increase the number of parallel jobs in the pipeline.

    Why it's wrong here

    Increasing the number of parallel jobs increases the number of pipelines or stages that can run concurrently, but a single build's elapsed time is not reduced by this change. It only improves throughput when running multiple independent builds, and it can even cause resource contention on hosted agents, potentially slowing down each individual build.

  • Use multi-stage build with parallel test execution.

    Why this is correct

    Using multi-stage builds lets you split test execution into parallel jobs after the build artifacts are produced, so test suites run concurrently across multiple agents instead of sequentially. This shortens the critical path of the pipeline by overlapping build and test phases, which can significantly reduce the overall build and test time.

  • Use a self-hosted agent with pre-installed dependencies.

    Why this is correct

    Self-hosted agents can have the .NET SDK, NuGet tooling, and project dependencies pre-installed, eliminating the per-job setup, tool installation, and package restore steps that Microsoft-hosted agents perform. This reduces environment preparation time and network overhead, making the pipeline faster, especially when dependencies are large or numerous.

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 →

How Courseiva writes practice questions · Editorial policy

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.