Couchbase.Aspire.Hosting.Indices 1.0.0-beta.5

Prefix Reserved
This is a prerelease version of Couchbase.Aspire.Hosting.Indices.
dotnet add package Couchbase.Aspire.Hosting.Indices --version 1.0.0-beta.5
                    
NuGet\Install-Package Couchbase.Aspire.Hosting.Indices -Version 1.0.0-beta.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Couchbase.Aspire.Hosting.Indices" Version="1.0.0-beta.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Couchbase.Aspire.Hosting.Indices" Version="1.0.0-beta.5" />
                    
Directory.Packages.props
<PackageReference Include="Couchbase.Aspire.Hosting.Indices" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Couchbase.Aspire.Hosting.Indices --version 1.0.0-beta.5
                    
#r "nuget: Couchbase.Aspire.Hosting.Indices, 1.0.0-beta.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Couchbase.Aspire.Hosting.Indices@1.0.0-beta.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Couchbase.Aspire.Hosting.Indices&version=1.0.0-beta.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Couchbase.Aspire.Hosting.Indices&version=1.0.0-beta.5&prerelease
                    
Install as a Cake Tool

Couchbase.Aspire.Hosting.Indices library

Provides extension methods and resource definitions to add index management to a Couchbase cluster resource in an Aspire AppHost.

Getting Started

Install the package

dotnet add package Couchbase.Aspire.Hosting.Indices

Usage example

In the AppHost.cs file of your AppHost, add indices to a Couchbase bucket resource using the following methods:

var couchbase = builder.AddCouchbase("couchbase");
var bucket = couchbase.AddBucket("mybucket")
    .WithIndices("../indices");

var myService = builder.AddProject<Projects.MyService>()
    .WithReference(bucket)
    .WaitFor(bucket);

Waiting for indices to be ready

It is also possible to wait for the indices to be applied before starting your application:

var couchbase = builder.AddCouchbase("couchbase");
var bucket = couchbase.AddBucket("mybucket");

var bucketIndices = bucket.AddIndexManager("mybucket-indices")
    .WithIndices("../indices");

var myService = builder.AddProject<Projects.MyService>()
    .WithReference(bucket)
    .WaitFor(bucket)
    .WaitForCompletion(bucketIndices);

Index definition files

Index definition files are JSON or YAML files that define the indexes to be created on a Couchbase bucket. They may be referenced by directory or by individual file. See couchbase-index-manager Documentation for details on the file format.

Using with a secure Couchbase cluster

If your Couchbase cluster uses TLS/SSL, you may need to configure the index manager to trust the cluster's certificate.

var certAuthorityCollection = builder.AddCertificateAuthorityCollection("couchbase-cert-authority")
    .WithCertificate(certificateWithPrivateKey);

var couchbase = builder.AddCouchbase("couchbase");
var bucket = couchbase.AddBucket("mybucket")
    .WithRootCertificateAuthority(certAuthorityCollection); // Use the certificate for the Couchbase cluster

var bucketIndices = bucket.AddIndexManager("mybucket-indices")
    .WithIndices("../indices")
    .WithCertificateAuthorityCollection(certAuthorityCollection); // Trust the certificate for index management

var myService = builder.AddProject<Projects.MyService>()
    .WithReference(bucket)
    .WaitFor(bucket)
    .WaitForCompletion(bucketIndices);

Feedback & contributing

https://github.com/couchbaselabs/couchbase-aspire

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.0-beta.5 1,153 4/28/2026
1.0.0-beta.4 88 4/21/2026
1.0.0-beta.3 821 4/4/2026
1.0.0-beta.2 543 3/6/2026
1.0.0-beta.1 254 2/27/2026
1.0.0-alpha.5 93 2/26/2026
1.0.0-alpha.4 88 1/25/2026
1.0.0-alpha.3 90 1/19/2026