NorthernNerds.Aspire.Hosting.Neo4j 3.1.0

dotnet add package NorthernNerds.Aspire.Hosting.Neo4j --version 3.1.0
                    
NuGet\Install-Package NorthernNerds.Aspire.Hosting.Neo4j -Version 3.1.0
                    
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="NorthernNerds.Aspire.Hosting.Neo4j" Version="3.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NorthernNerds.Aspire.Hosting.Neo4j" Version="3.1.0" />
                    
Directory.Packages.props
<PackageReference Include="NorthernNerds.Aspire.Hosting.Neo4j" />
                    
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 NorthernNerds.Aspire.Hosting.Neo4j --version 3.1.0
                    
#r "nuget: NorthernNerds.Aspire.Hosting.Neo4j, 3.1.0"
                    
#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 NorthernNerds.Aspire.Hosting.Neo4j@3.1.0
                    
#: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=NorthernNerds.Aspire.Hosting.Neo4j&version=3.1.0
                    
Install as a Cake Addin
#tool nuget:?package=NorthernNerds.Aspire.Hosting.Neo4j&version=3.1.0
                    
Install as a Cake Tool

NorthernNerds.Aspire.Hosting.Neo4j

Build Status NuGet Version License

NorthernNerds.Aspire.Hosting.Neo4j is an unofficial Aspire hosting integration for Neo4j. This package provides the infrastructure components needed to run Neo4j in your Aspire projects.

Features

  • Add Neo4j as a container resource in your Aspire AppHost
  • Configure Neo4j connection settings through Aspire parameters
  • Built-in HTTP health check so WaitFor(...) waits for Neo4j to be ready
  • Data persistence via WithDataVolume / WithDataBindMount
  • Automatic container management and configuration

Release notes

3.1.0 (since v3.0.0)

  • Updated to .NET Aspire 13.4
  • Added an HTTP health check on the Neo4j endpoint so WaitFor(...) waits for real readiness
  • Added WithDataVolume and WithDataBindMount for data persistence (mounts /data)
  • Added argument guard clauses to AddNeo4j
  • Bumped the Neo4j container image to the 5.26 LTS
  • Thanks to @joshmakestuff for this contribution! (#7)

3.0.0 (since v2.0.0)

  • Upgraded to .NET 10 and .NET Aspire 13.1
  • Enhanced AddNeo4j hosting integration ([ResourceName], nullable ports, improved NEO4J_AUTH handling, endpoint refactor)
  • Example updated to wait for Neo4j readiness

Getting Started

Installation

dotnet add package NorthernNerds.Aspire.Hosting.Neo4j

Usage

In your AppHost project:

using NorthernNerds.Aspire.Hosting.Neo4j;

var builder = DistributedApplication.CreateBuilder(args);

var neo4jPass = builder.AddParameter("neo4j-pass", secret: true);
var neo4jUser = builder.AddParameter("neo4j-user", secret: true);

var neo4jDb = builder.AddNeo4j("graph-db", neo4jUser, neo4jPass)
    .WithDataVolume(); // persist the graph across restarts

builder.AddProject<Projects.MyApi>("api")
    .WithReference(neo4jDb)
    .WaitFor(neo4jDb); // gated on the built-in Neo4j health check

AddNeo4j registers an HTTP health check against the Neo4j endpoint, so WaitFor(neo4jDb) blocks dependents until Neo4j is actually accepting connections. Use WithDataBindMount("./data") instead of WithDataVolume() to persist to a host directory.

Configure parameters in appsettings.json:

{
  "Parameters": {
    "neo4j-pass": "Password",
    "neo4j-user": "neo4j"
  }
}

About Northern Nerds

Northern Nerds is a one-man freelance software company dedicated to creating high-quality software solutions. For more integrations and tools, follow our work!

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
3.1.0 186 7/19/2026
3.0.0 533 1/2/2026
2.0.0 2,777 11/17/2024
2.0.0-alpha 170 11/17/2024

3.1.0 (since v3.0.0)
- Updated to .NET Aspire 13.4
- Added an HTTP health check on the Neo4j endpoint so WaitFor(...) waits for real readiness
- Added WithDataVolume and WithDataBindMount for data persistence (mounts /data)
- Added argument guard clauses to AddNeo4j
- Bumped the Neo4j container image to the 5.26 LTS
- Thanks to @joshmakestuff for this contribution! (#7)

3.0.0 (since v2.0.0)
- Upgraded to .NET 10 and .NET Aspire 13.1
- Enhanced AddNeo4j hosting integration ([ResourceName], nullable ports, improved NEO4J_AUTH handling, endpoint refactor)
- Example updated to wait for Neo4j readiness