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

A .NET Aspire hosting integration for Apache Solr.

Published
Nov 25, 2025
10mo ago
Total Downloads
16.6K
16,623

Install

dotnet add package CommunityToolkit.Aspire.Hosting.Solr --version 13.0.0
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.0.0-beta.462 and v13.0.0.

Adoption Assessment

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

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.