Build and Publish a .NET CLI Tool with Azure Pipelines | NuGet CI/CD Tutorial
Published 10/03/2026
Description
Learn how to build your own .NET CLI tool and automate packaging and publishing with Azure Pipelines. Microsoft documents publishing NuGet packages with the .NET CLI and publishing packages through Azure Pipelines to internal feeds and public registries such as nuget.org. In this video, I walk through the full workflow from local development in Visual Studio to CI/CD in Azure DevOps, including packaging the tool into a .nupkg and preparing it for automated publishing. Microsoft’s NuGet quickstart explains package creation and publishing with dotnet nuget push, and Azure Pipelines documentation shows how package publishing fits into YAML or Classic pipelines. 0:00 - Introduction 0:13 - Description 1:39 - Dotnet Tool 6:40 - CSProj File 8:52 - Build Pipeline 10:06 - Release Pipeline 10:48 - Conclusion What you’ll learn: How to create and configure a custom .NET tool project for packaging and distribution. Publishing a .NET package ultimately produces a .nupkg, which Microsoft’s NuGet docs use as the package artifact for distribution. How to build and test the tool locally before automating the process. Azure Pipelines package workflows typically include restore, build, test, and pack steps before publishing. How to set up a build pipeline to compile and package your tool automatically. Microsoft’s Azure Pipelines guidance shows pack and push steps as part of package publishing workflows. How to publish the package using authenticated pipeline steps or CLI-based publishing. Microsoft documents dotnet nuget push for package publishing and also documents authenticated publishing through Azure Pipelines. Common packaging and release pitfalls to watch for when distributing tooling through NuGet. Guidance around package publication emphasizes authentication, package visibility delays after publishing, and feed configuration. By the end, you will have a repeatable workflow that builds, packages, and publishes your .NET tool from source control. Az