Skip to main content
net10.0net8.0net9.0

An Aspire hosting integration for providing a DuckDB database connection.

Published
Aug 1, 2026
2mo ago
Total Downloads
2.6K
2,559

Install

dotnet add package CommunityToolkit.Aspire.Hosting.DuckDB --version 13.4.1-beta.696
ProductVersions
.NET
net10.0net8.0net9.0

README

CommunityToolkit.Aspire.Hosting.DuckDB library

Provides extension methods and resource definitions for the Aspire AppHost to support creating and running DuckDB databases.

DuckDB is an in-process analytical (OLAP) database, ideal for analytics workloads, Parquet/CSV querying, and data processing.

By default, the DuckDB resource will create a new DuckDB database in a temporary location. You can also specify a path to an existing DuckDB database file.

Getting Started

Install the package

In your AppHost project, install the package using the following command:

dotnet add package CommunityToolkit.Aspire.Hosting.DuckDB

Example usage

Then, in the Program.cs file of AppHost, define a DuckDB resource, then call AddDuckDB:

var duckdb = builder.AddDuckDB("analytics");

To use a read-only database for analytics:

var duckdb = builder.AddDuckDB("warehouse")
    .WithReadOnly();

Additional Information

https://duckdb.org

Feedback & contributing

https://github.com/CommunityToolkit/Aspire

Changes from Previous Version

No structural changes between v13.4.1-beta.687 and v13.4.1-beta.696.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.