AZ-400 Practice Question: Design and implement build and release pipelines
Your build pipeline uses a self-hosted agent in your on-premises network. The agent pool is configured to use the 'latest' agent version. Recently, a new version of the Azure Pipelines agent was released, and your builds started failing because the new agent requires .NET 6.0, which is not installed on the agent machine. What is the best way to prevent this issue in the future?
⚠ Common exam trap
Candidates often confuse disabling automatic agent updates (which only prevents the agent binary from self-updating) with controlling which agent version the pipeline uses; the 'latest' pool setting overrides local update settings, so builds still fail even with updates disabled.
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
✓
Configure the agent pool to use a specific agent version (e.g., '2.210.0') and test new versions in a separate pool before updating.
It decouples your production pipeline from automatic agent updates. By pinning the agent pool to a known-working version (e.g., '2.210.0'), you can validate new agent releases in a separate test pool before rolling them out. This prevents breaking changes—like a new .NET dependency—from impacting your builds without prior testing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Configure the agent pool to use a specific agent version (e.g., '2.210.0') and test new versions in a separate pool before updating.
Why this is correct
Pinning the agent to a specific version prevents unexpected auto-updates from introducing breaking changes, ensuring consistent behavior across builds. By testing new versions in a separate pool first, you can validate compatibility with your pipelines and then control the rollout to production agents, giving you deterministic agent environments.
- ✗
Switch to using Microsoft-hosted agents instead of self-hosted.
Why it's wrong here
Switching to Microsoft-hosted agents would sidestep self-hosted agent version drift because those agents are ephemeral and automatically managed, but this option is typically wrong because your on-premises pipeline likely depends on internal networks, private resources, or compliance boundaries that Microsoft-hosted agents cannot access. It also abandons the deterministic, self-managed agent environment you need and replaces it with a completely different execution context, which can introduce new incompatibilities and violates data-residency or security policies. Rather than fixing the version-pinning strategy for self-hosted agents, this is a migration decision with significant operational and compliance trade-offs, not a targeted fix.
- ✗
Disable automatic agent updates on the self-hosted agents.
Why it's wrong here
Disabling automatic agent updates freezes the agent at a fixed version, but this also blocks critical security patches and bug fixes, leaving your build infrastructure vulnerable. Azure DevOps recommends accepting automatic updates or using a controlled rollout via agent pools instead, because freezing updates creates long-term maintenance and compliance risks without preventing future incompatibilities.
- ✗
Install .NET 6.0 on the agent machine to meet the new requirement.
Why it's wrong here
Installing .NET 6.0 resolves the immediate dependency failure, but it is a reactive fix that does not address the root cause of agent version drift. Future pipeline requirements will likely demand additional runtimes or changes, and without a strategy to pin and test agent versions, the pool remains non-deterministic and prone to similar issues again.
Visual reference
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
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.
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.
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.