AZ-400 Practice Question: Design and implement build and release pipelines
You are designing a build pipeline that uses Microsoft-hosted agents. The pipeline must build a .NET Framework 4.8 application and run on a Windows agent. Due to compliance, the build must use a specific version of Visual Studio that is not pre-installed on the Microsoft-hosted agents. 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 self-hosted agent that has the required version of Visual Studio installed.
To use a specific version of Visual Studio not pre-installed on Microsoft-hosted agents, you can either use a self-hosted agent with that version installed, or run the build in a Docker container that includes the required Visual Studio/Build Tools version. Microsoft-hosted agents have Docker installed and can run Windows containers, so option B is viable. Options C and D do not install a full Visual Studio version.
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 that has the required version of Visual Studio installed.
Why this is correct
Microsoft-hosted agents provide only a fixed set of pre-installed Visual Studio versions, so if the required version is absent, the build cannot run on them. A self-hosted agent can be explicitly provisioned with the exact Visual Studio version needed, and registered with an agent pool so pipeline jobs are matched to it via capabilities.
- ✓
Build the application inside a Docker container that includes the required Visual Studio version.
Why this is correct
Docker containers can include Visual Studio, but Microsoft-hosted agents do not support running Windows containers by default; a self-hosted agent would be needed.
- ✗
Specify the 'vsVersion' parameter in the MSBuild task to target the required version.
Why it's wrong here
The vsVersion parameter selects which Visual Studio version to use from those already installed; it does not install a new version.
- ✗
Use the 'Visual Studio Test Platform Installer' task to install the required version at build time.
Why it's wrong here
The 'Visual Studio Test Platform Installer' task installs only the VSTest test platform (vstest.console.exe) and its related test runners, not the full Visual Studio IDE, MSBuild toolchain, or build-time components. Therefore, it cannot supply a missing Visual Studio version needed for the build itself, only for running tests.
Go deeper
Related to this question
Learn chapter
Designing a Build Pipeline
Key term
Build pipeline
A build pipeline is an automated sequence of steps that compiles source code into a deployable artifact, running tests and checks along the way.
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
Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.