Write your pipelines in C# !
See the codeWrite CI/CD pipelines in C#. Debug them locally. Ship with confidence.
You know the drill. You write some YAML, push it, wait for CI to start, watch it fail on a typo, fix it, push again, wait again. Repeat until you lose the will to live.
YAML pipelines are:
ModularPipelines lets you write your CI/CD pipelines as regular C# code. That means:
Set a breakpoint. Step through your pipeline. Fix it before you push.
[DependsOn<BuildModule>]
[DependsOn<TestModule>]
public class PublishModule : Module<CommandResult>
{
protected override async Task<CommandResult> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
// This is real C#. Set a breakpoint. Inspect variables. Debug locally.
return await context.Tools.DotNet.PublishAsync(new DotNetPublishOptions
{
ProjectSolution = "src/MyApp/MyApp.csproj",
Configuration = "Release",
Output = "publish/"
}, cancellationToken: cancellationToken);
}
}
Intellisense, refactoring, compile-time errors. Your pipeline code gets the same treatment as your application code. Rename a module? Your IDE updates all the references. Typo in an option? Red squiggle before you even save.
Test your entire pipeline on your machine before pushing. No more "let me push and see if it works" commits. Debug failures in your IDE instead of reading logs from a build agent.
Modules declare their dependencies with attributes. ModularPipelines figures out what can run in parallel and maximizes throughput. No more manually orchestrating parallel jobs.
Your pipeline logic lives in C#, not in vendor-specific YAML. Moving from GitHub Actions to Azure Pipelines to TeamCity? Change one line - your modules stay the same.
Inject services, configuration, and secrets the same way you do in ASP.NET Core. Mock dependencies for testing. No more environment variable gymnastics.
Secrets are automatically obfuscated in logs. No more accidentally exposing API keys in build output.
Modules return strongly-typed results that other modules can consume. No shared mutable state - just clean data flow.
// BuildModule returns version info
public class BuildModule : Module<BuildInfo>
{
protected override async Task<BuildInfo> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
await context.Tools.DotNet.BuildAsync(
new DotNetBuildOptions { ProjectSolution = "MyApp.csproj" },
cancellationToken: cancellationToken);
return new BuildInfo { Version = "1.0.0", OutputPath = "bin/Release" };
}
}
// PublishModule retrieves and uses it
[DependsOn<BuildModule>]
public class PublishModule : Module
{
protected override async Task ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
var buildResult = await context.GetModule<BuildModule>();
var outputPath = buildResult.Value.OutputPath; // Throws with module context if unavailable
// Publish using the build output...
}
}
Built-in Roslyn analyzers catch common mistakes before you even run:
[DependsOn] when calling GetModule<T>()await module resultsConsole.Write instead of the logging systemdotnet new install ModularPipelines.Templates
dotnet new modularpipeline -n MyPipeline \
--solution ../MySolution.slnx \
--publish-project ../src/MyApp/MyApp.csproj
cd MyPipeline
dotnet run
The generated project contains separate restore, build, test, and publish modules with explicit dependencies and configurable paths. See the template source for a complete copy-ready example.
Adding pipeline modules to an existing project instead? Install the core framework and the .NET CLI integration used by the examples above:
dotnet add package ModularPipelines
dotnet add package ModularPipelines.DotNet
Then configure and execute the pipeline from Program.cs:
using ModularPipelines;
var builder = Pipeline.CreateBuilder(args);
await builder.RunAsync();
See exactly what's happening as your pipeline runs:
Get a clear summary when your pipeline completes:
ModularPipelines has strongly-typed wrappers for the tools you already use:
| ModularPipelines | Cake | Nuke | |
|---|---|---|---|
| Language | Real C# | C# DSL (scripted) | Real C# |
| Parallelization | Automatic based on dependencies | Manual | Manual |
| Architecture | Separate module classes (SRP) | Single build script | Single build class |
| Dependency Injection | Full Microsoft.Extensions.DI | Limited | Built-in but different |
| Setup | dotnet run | Requires bootstrapper | Requires global tool |
| Module Communication | Strongly-typed return values | Shared state | Parameters |
ModularPipelines takes a different approach: each unit of work is a self-contained module class. This keeps code organized, makes merge conflicts rare, and lets you test modules in isolation.
DependsOnIf<T>() for dynamic dependency graphsWhile I aim to maintain stability, minor versions may include breaking changes. These will always be documented in release notes.
1,186 followers · starred Jan 2025
67 followers · starred Aug 2026
161 followers · starred Feb 2026
2,548 followers · starred Jun 2024
Write your pipelines in C# !
See the codeWrite CI/CD pipelines in C#. Debug them locally. Ship with confidence.
You know the drill. You write some YAML, push it, wait for CI to start, watch it fail on a typo, fix it, push again, wait again. Repeat until you lose the will to live.
YAML pipelines are:
ModularPipelines lets you write your CI/CD pipelines as regular C# code. That means:
Set a breakpoint. Step through your pipeline. Fix it before you push.
[DependsOn<BuildModule>]
[DependsOn<TestModule>]
public class PublishModule : Module<CommandResult>
{
protected override async Task<CommandResult> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
// This is real C#. Set a breakpoint. Inspect variables. Debug locally.
return await context.Tools.DotNet.PublishAsync(new DotNetPublishOptions
{
ProjectSolution = "src/MyApp/MyApp.csproj",
Configuration = "Release",
Output = "publish/"
}, cancellationToken: cancellationToken);
}
}
Intellisense, refactoring, compile-time errors. Your pipeline code gets the same treatment as your application code. Rename a module? Your IDE updates all the references. Typo in an option? Red squiggle before you even save.
Test your entire pipeline on your machine before pushing. No more "let me push and see if it works" commits. Debug failures in your IDE instead of reading logs from a build agent.
Modules declare their dependencies with attributes. ModularPipelines figures out what can run in parallel and maximizes throughput. No more manually orchestrating parallel jobs.
Your pipeline logic lives in C#, not in vendor-specific YAML. Moving from GitHub Actions to Azure Pipelines to TeamCity? Change one line - your modules stay the same.
Inject services, configuration, and secrets the same way you do in ASP.NET Core. Mock dependencies for testing. No more environment variable gymnastics.
Secrets are automatically obfuscated in logs. No more accidentally exposing API keys in build output.
Modules return strongly-typed results that other modules can consume. No shared mutable state - just clean data flow.
// BuildModule returns version info
public class BuildModule : Module<BuildInfo>
{
protected override async Task<BuildInfo> ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
await context.Tools.DotNet.BuildAsync(
new DotNetBuildOptions { ProjectSolution = "MyApp.csproj" },
cancellationToken: cancellationToken);
return new BuildInfo { Version = "1.0.0", OutputPath = "bin/Release" };
}
}
// PublishModule retrieves and uses it
[DependsOn<BuildModule>]
public class PublishModule : Module
{
protected override async Task ExecuteAsync(IModuleContext context, CancellationToken cancellationToken)
{
var buildResult = await context.GetModule<BuildModule>();
var outputPath = buildResult.Value.OutputPath; // Throws with module context if unavailable
// Publish using the build output...
}
}
Built-in Roslyn analyzers catch common mistakes before you even run:
[DependsOn] when calling GetModule<T>()await module resultsConsole.Write instead of the logging systemdotnet new install ModularPipelines.Templates
dotnet new modularpipeline -n MyPipeline \
--solution ../MySolution.slnx \
--publish-project ../src/MyApp/MyApp.csproj
cd MyPipeline
dotnet run
The generated project contains separate restore, build, test, and publish modules with explicit dependencies and configurable paths. See the template source for a complete copy-ready example.
Adding pipeline modules to an existing project instead? Install the core framework and the .NET CLI integration used by the examples above:
dotnet add package ModularPipelines
dotnet add package ModularPipelines.DotNet
Then configure and execute the pipeline from Program.cs:
using ModularPipelines;
var builder = Pipeline.CreateBuilder(args);
await builder.RunAsync();
See exactly what's happening as your pipeline runs:
Get a clear summary when your pipeline completes:
ModularPipelines has strongly-typed wrappers for the tools you already use:
| ModularPipelines | Cake | Nuke | |
|---|---|---|---|
| Language | Real C# | C# DSL (scripted) | Real C# |
| Parallelization | Automatic based on dependencies | Manual | Manual |
| Architecture | Separate module classes (SRP) | Single build script | Single build class |
| Dependency Injection | Full Microsoft.Extensions.DI | Limited | Built-in but different |
| Setup | dotnet run | Requires bootstrapper | Requires global tool |
| Module Communication | Strongly-typed return values | Shared state | Parameters |
ModularPipelines takes a different approach: each unit of work is a self-contained module class. This keeps code organized, makes merge conflicts rare, and lets you test modules in isolation.
DependsOnIf<T>() for dynamic dependency graphsWhile I aim to maintain stability, minor versions may include breaking changes. These will always be documented in release notes.
1,186 followers · starred Jan 2025
67 followers · starred Aug 2026
161 followers · starred Feb 2026
2,548 followers · starred Jun 2024