Provides extension methods and resource definitions for an Aspire AppHost to configure a RavenDB resource.
In your AppHost project, install the Aspire RavenDB Hosting library with NuGet:
dotnet add package CommunityToolkit.Aspire.Hosting.RavenDB
Then, in the Program.cs file of AppHost, add a RavenDB resource and consume the connection using the following methods:
var db = builder.AddRavenDB("ravendb").AddDatabase("mydb");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(db);Every database added with AddDatabase(...) exposes a clickable RavenDB Studio link in the Aspire dashboard that opens that database's Documents view directly (for example http://localhost:9534/studio/index.html#databases/documents?&database=mydb). The link is added automatically — no extra configuration is required. For secured servers it uses the configured public server URL.
https://learn.microsoft.com/dotnet/aspire/community-toolkit/ravendb