AZ-400 Practice Question: Design and implement build and release pipelines
Network Topology
Refer to the exhibit. A build pipeline produces the above logs. Which change would resolve the build failure?
⚠ Common exam trap
The trap here is that candidates may focus on build flags like '--no-build' or configuration settings, overlooking the actual compilation error message that clearly indicates a missing method definition.
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
✓
Add a definition for 'MyMethod' in the 'MyClass' class.
The build failure is caused by a missing method definition. The logs indicate that the test step is attempting to invoke 'MyMethod' on an instance of 'MyClass', but the compiler cannot find it. Adding the missing method to the class resolves the compilation error, which is the root cause of the pipeline failure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Change the build configuration from Release to Debug.
Why it's wrong here
Switching the build configuration from Release to Debug does not change the C# compiler's behavior when it encounters an undefined member. Both configurations compile the exact same source files; the only differences are optimization settings (e.g., '/optimize') and debug symbols (e.g., '/debug'). The compiler will emit CS1061 regardless of whether the target is Debug or Release. Therefore, this option cannot fix the missing 'MyMethod' definition in 'MyClass'.
- ✓
Add a definition for 'MyMethod' in the 'MyClass' class.
Why this is correct
The build error is a CS1061 compilation error: the C# compiler cannot find a member named 'MyMethod' on the type 'MyClass'. This means the calling code references a method that is not declared anywhere in the class definition. Adding a method with the exact name 'MyMethod' and a compatible signature (parameter list and return type) to the 'MyClass' class is the only way to satisfy the compiler. Without this addition, any downstream steps (like tests) will have no valid assembly to run.
- ✗
Remove the '--no-build' flag from the test step.
Why it's wrong here
Removing the '--no-build' flag from the test step does not address the root cause because the build step itself has already failed—there is no compiled assembly for 'dotnet test' to execute. If the flag were removed, 'dotnet test' would trigger a rebuild, but that rebuild would fail again with the exact same CS1061 error. The '--no-build' flag is used after a successful build to skip redundant compilation, so toggling it cannot resolve a missing method definition.
- ✗
Add the '--no-restore' flag to the build step.
Why it's wrong here
Adding the '--no-restore' flag to the build step would actually instruct the .NET CLI to skip the NuGet package restore phase before building, which is irrelevant to this scenario. The error CS1061 is a C# source code compilation error, not a missing package reference or restore failure. In fact, suppressing restore could introduce additional errors about missing package references, making the build worse. The fix must come from correcting the source code, not from changing how dependencies are fetched.
Visual reference
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
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.