Exploring File-Based C# Scripts in Azure DevOps Pipelines

What if you could replace your Bash or PowerShell scripts with C#? With .NET 10’s File-Based Apps, you can run a .cs file directly—no project files, no build step. In this post, we’ll explore how to use C# scripts in Azure DevOps pipelines, using a real example: deploying an AI agent with a single .cs file. Why C# for Pipeline Scripts? Pipeline scripts are typically written in Bash or PowerShell. But what if you already know C#? With .NET 10’s file-based apps, you can now use C# as a scripting language—similar to how Node.js or Python work. ...

December 3, 2025 · 3 min · 594 words · Me