AZ-400 Practice Question: Design and implement build and release pipelines
Your company is migrating from on-premises Jenkins to Azure Pipelines. You have a Jenkins pipeline that builds a C++ application using MSBuild. The build environment requires specific Visual Studio components and SDKs. You need to set up a build agent in Azure Pipelines that matches the Jenkins environment. You want to minimize administrative overhead and ensure the agent is always up to date with the latest patches. What should you do?
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
✓
Use a Microsoft-hosted agent with the 'windows-2022' image that includes Visual Studio Build Tools.
Microsoft-hosted agents include Visual Studio Build Tools and are automatically updated, minimizing administrative overhead. Option A is incorrect because using a custom image on a self-hosted agent still requires maintaining the image and applying updates. Option B is incorrect because container-based agents require building and managing a custom Docker image that includes Visual Studio and SDKs, which adds overhead. Option D is incorrect because a self-hosted agent on an Azure VM requires manual installation of required components and ongoing patching, increasing administrative effort.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use a self-hosted agent on an Azure VM with a custom image that includes Visual Studio and SDKs.
Why it's wrong here
A self-hosted agent on an Azure VM with a custom image gives you environment control, but you must patch the OS/agent, update the image with new SDKs, and manage scaling and security—adding ongoing maintenance overhead that nullifies the convenience of Azure Pipelines' managed services.
- ✗
Deploy a container-based agent using a Docker image that includes Visual Studio.
Why it's wrong here
A container-based agent requires building and maintaining a custom Docker image, registering it with a container host (e.g., ACI or AKS), and handling Windows container licensing and compatibility issues—plus the agent software still needs periodic updates, so it is not inherently less operational burden.
- ✓
Use a Microsoft-hosted agent with the 'windows-2022' image that includes Visual Studio Build Tools.
Why this is correct
The Microsoft-hosted 'windows-2022' agent is pre-provisioned with Visual Studio Build Tools and common SDKs, auto-patched and recycled per job, eliminating infrastructure maintenance while supporting most build scenarios—making it the simplest, most reliable choice for this migration.
- ✗
Provision a self-hosted agent on an Azure VM and install required components manually.
Why it's wrong here
Manually provisioning an Azure VM and installing the agent, SDKs, and tools is the most time-consuming option: you own every step from OS configuration to ongoing updates, and any version drift can break builds—defeating the purpose of moving to a managed CI/CD service.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Environment
An environment is a dedicated set of computing resources, configurations, and services used to develop, test, or host software applications in a controlled and repeatable way.
Key term
Pipeline
A pipeline is an automated series of steps that takes code from development to production, ensuring quality and speed.
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.