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

A .NET Aspire hosting integration for Apache Solr.

Published
Jan 28, 2026
8mo ago
Total Downloads
16.6K
16,623

Install

dotnet add package CommunityToolkit.Aspire.Hosting.Solr --version 13.1.2-beta.511
ProductVersions
.NET
net10.0net8.0net9.0

README

CommunityToolkit.Aspire.Hosting.Solr

This package provides a .NET Aspire hosting integration for Apache Solr, enabling you to add and configure a Solr container as part of your distributed application.

Getting Started

Install the package

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

dotnet add package CommunityToolkit.Aspire.Hosting.Solr

Usage Example

var builder = DistributedApplication.CreateBuilder(args);

// Add Solr resource with default settings (port 8983, core "solr")
var solr = builder.AddSolr("solr");

// Add Solr with custom port
var solrWithCustomPort = builder.AddSolr("solr-custom", port: 8984);

// Add Solr with custom core name
var solrWithCustomCore = builder.AddSolr("solr-core", coreName: "mycore");

// Add Solr with both custom port and core name
var solrCustom = builder.AddSolr("solr-full", port: 8985, coreName: "documents");

// Reference the Solr resource in a project
var exampleProject = builder.AddProject<Projects.ExampleProject>()
                            .WithReference(solr);

// Initialize and run the application
builder.Build().Run();

Feedback & contributing

https://github.com/dotnet/aspire

Changes from Previous Version

No structural changes between v13.1.2-beta.509 and v13.1.2-beta.511.

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.