DaggerIO 0.1.0-preview.2
dotnet add package DaggerIO --version 0.1.0-preview.2
NuGet\Install-Package DaggerIO -Version 0.1.0-preview.2
<PackageReference Include="DaggerIO" Version="0.1.0-preview.2" />
<PackageVersion Include="DaggerIO" Version="0.1.0-preview.2" />
<PackageReference Include="DaggerIO" />
paket add DaggerIO --version 0.1.0-preview.2
#r "nuget: DaggerIO, 0.1.0-preview.2"
#:package DaggerIO@0.1.0-preview.2
#addin nuget:?package=DaggerIO&version=0.1.0-preview.2&prerelease
#tool nuget:?package=DaggerIO&version=0.1.0-preview.2&prerelease
Dagger SDK for .NET
A client package for running Dagger pipelines in .NET.
What is the Dagger .NET SDK?
The Dagger .NET SDK contains everything you need to develop CI/CD pipelines in C#, and run them on any OCI-compatible container runtime.
Requirements
- .NET 10.0 or later
- Docker, or another OCI-compatible container runtime
A compatible version of the Dagger CLI is automatically downloaded and run by the SDK for you.
Installation
dotnet add package DaggerIO
Example
Create a Program.cs file:
using Dagger;
var output = await Dag
.Container()
.From("alpine:latest")
.WithExec(new[] { "echo", "Hello from Dagger!" })
.StdoutAsync();
Console.WriteLine(output);
Run with:
dagger run dotnet run
Output:
Hello from Dagger!
Note: It may take a while for it to finish, especially on first run with cold cache.
More Examples
Run Tests in a Container
using Dagger;
var exitCode = await Dag
.Container()
.From("mcr.microsoft.com/dotnet/sdk:8.0")
.WithDirectory("/src", Dag.Host().Directory("."))
.WithWorkdir("/src")
.WithExec(new[] { "dotnet", "test" })
.ExitCodeAsync();
Environment.Exit(exitCode);
Build and Publish a Container
using Dagger;
var source = Dag.Host().Directory(".");
// Build
var buildOutput = Dag
.Container()
.From("mcr.microsoft.com/dotnet/sdk:8.0")
.WithDirectory("/src", source)
.WithWorkdir("/src")
.WithExec(new[] { "dotnet", "publish", "-c", "Release", "-o", "/app" })
.Directory("/app");
// Create runtime image
var image = Dag
.Container()
.From("mcr.microsoft.com/dotnet/runtime:8.0")
.WithDirectory("/app", buildOutput)
.WithEntrypoint(new[] { "dotnet", "/app/MyApp.dll" });
// Publish
var ref = await image.Publish("myregistry.io/myapp:latest");
Console.WriteLine($"Published: {ref}");
Learn More
Creating Reusable Modules
Want to create reusable Dagger modules that others can call? See the module development guide.
License
Apache 2.0 - See LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.2 | 79 | 11/29/2025 |
| 0.1.0-preview.1 | 84 | 11/29/2025 |
| 0.1.0-preview | 136 | 11/23/2025 |