Azure DevOps Engineer Question 27

KodeKloud
KodeKloudApr 9, 2026

Why It Matters

Ensuring artifacts contain only binaries prevents source leakage and streamlines deployments, directly impacting security and operational efficiency.

Key Takeaways

  • Use .NET Core CLI publish task to generate deployment artifact.
  • Artifact contains only compiled binaries and config, excludes source code.
  • Copy Files task would incorrectly include entire source repository.
  • Archive Files task without build yields no compiled output.
  • Publish Build Artifacts task alone cannot filter out source files.

Summary

The video walks through AZ‑400 question 27, which asks which Azure Pipelines task should be used to create a deployment artifact for a .NET application that must contain only compiled binaries and configuration files, not source code.

It explains that the .NET Core CLI task with the publish command compiles the project, places the output in the publish folder, and automatically excludes source files. This task therefore satisfies the requirement for a clean, deploy‑ready artifact.

The presenter dismisses the other options: the Copy Files task would copy the entire repository, the Archive Files task would package unbuilt source, and the Publish Build Artifacts task alone cannot filter out source code. These explanations reinforce the standard .NET CI/CD pattern.

Choosing the correct task reduces artifact size, improves security by not exposing source, and aligns with Microsoft’s recommended pipeline design—critical for both exam success and production deployments.

Original Description

For the AZ-400 exam, when you need a .NET build artifact that contains only compiled binaries and configuration files—excluding source code—the correct solution is the .NET Core CLI task using the publish command. Unlike the Copy Files task, which risks including raw source code, or the Archive Files task, which simply compresses files without compiling them, the publish command specifically builds the project and packages only the files necessary for deployment. While the Publish Build Artifacts task is used to store the output, it must be preceded by a proper build step to ensure the artifact remains clean and production-ready.
#AZ400 #AzureDevOps #DotNet #CICD #AzureAppService #DevOps #Automation #TechTips #KodeKloud

Comments

Want to join the conversation?

Loading comments...