Aspire.Hosting.Nats
13.6.4
Prefix Reserved
dotnet add package Aspire.Hosting.Nats --version 13.6.4
NuGet\Install-Package Aspire.Hosting.Nats -Version 13.6.4
<PackageReference Include="Aspire.Hosting.Nats" Version="13.6.4" />
<PackageVersion Include="Aspire.Hosting.Nats" Version="13.6.4" />
<PackageReference Include="Aspire.Hosting.Nats" />
paket add Aspire.Hosting.Nats --version 13.6.4
#r "nuget: Aspire.Hosting.Nats, 13.6.4"
#:package Aspire.Hosting.Nats@13.6.4
#addin nuget:?package=Aspire.Hosting.Nats&version=13.6.4
#tool nuget:?package=Aspire.Hosting.Nats&version=13.6.4
NATS hosting integration
Use this integration to model, configure, and orchestrate a NATS resource in an Aspire solution.
Getting started
Add the integration
From your AppHost directory, add the Aspire.Hosting.Nats integration with the Aspire CLI:
aspire add Aspire.Hosting.Nats
Usage example
In the AppHost, add a NATS resource and reference it from another resource with either C# or TypeScript:
C#
var nats = builder.AddNats("nats");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(nats);
TypeScript
const nats = await builder.addNats("nats");
const myService = await builder.addNodeApp("myService", "../my-service", "server.js")
.withReference(nats);
Connection Properties
When you reference a NATS resource using WithReference, the following connection properties are made available to the consuming project:
NATS server
The NATS server resource exposes the following connection properties:
| Property Name | Description |
|---|---|
Host |
The hostname or IP address of the NATS server |
Port |
The port number the NATS server is listening on |
Username |
The username for authentication |
Password |
The password for authentication |
Uri |
The connection URI with the format nats://{Username}:{Password}@{Host}:{Port} |
Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called nats becomes NATS_URI.
Additional documentation
Feedback & contributing
| Product | Versions 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. |
-
net8.0
- Aspire.Hosting (>= 13.6.4)
- AspNetCore.HealthChecks.Uris (>= 9.0.0)
- Google.Protobuf (>= 3.36.1)
- Grpc.AspNetCore (>= 2.83.0)
- Grpc.Net.ClientFactory (>= 2.83.0)
- Grpc.Tools (>= 2.83.0)
- Hex1b (>= 0.168.0)
- KubernetesClient (>= 19.0.2)
- MessagePack (>= 2.5.307)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.12)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.12)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 8.0.31)
- Microsoft.Extensions.FileSystemGlobbing (>= 10.0.12)
- Microsoft.Extensions.Hosting (>= 10.0.12)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Http (>= 10.0.12)
- Microsoft.Extensions.Logging (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
- Microsoft.Extensions.Primitives (>= 10.0.12)
- ModelContextProtocol (>= 1.4.1)
- NATS.Net (>= 2.8.2)
- Newtonsoft.Json (>= 13.0.4)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.17.0)
- OpenTelemetry.Extensions.Hosting (>= 1.17.0)
- Polly.Core (>= 8.7.0)
- Semver (>= 3.0.0)
- StreamJsonRpc (>= 2.25.29)
- System.IO.Hashing (>= 10.0.12)
- System.Text.Json (>= 10.0.12)
- YamlDotNet (>= 18.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Aspire.Hosting.Nats:
| Repository | Stars |
|---|---|
|
formcms/formcms
AI Agent: Open-source headless CMS built with ASP.NET Core (C#) and React, featuring REST APIs, GraphQL, and a GrapesJS page designer.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 13.6.4 | 1,565 | 10/24/2026 |
| 13.6.3 | 1,221 | 10/21/2026 |
| 13.6.2 | 916 | 10/20/2026 |
| 13.6.1 | 9,947 | 10/7/2026 |
| 13.6.0 | 7,702 | 9/29/2026 |
| 13.5.4 | 13,778 | 9/15/2026 |
| 13.5.3 | 16,567 | 8/25/2026 |
| 13.5.2 | 1,794 | 8/21/2026 |
| 13.5.1 | 769 | 8/20/2026 |
| 13.5.0 | 4,205 | 8/18/2026 |
| 13.4.6 | 66,669 | 6/19/2026 |
| 13.4.5 | 2,961 | 6/17/2026 |
| 13.4.4 | 2,269 | 6/15/2026 |
| 13.4.3 | 4,739 | 6/8/2026 |
| 13.4.2 | 17,447 | 6/3/2026 |
| 13.4.1 | 502 | 6/3/2026 |
| 13.4.0 | 2,608 | 6/1/2026 |
| 13.3.5 | 8,995 | 5/21/2026 |
| 13.3.4 | 2,880 | 5/19/2026 |
| 13.3.3 | 3,444 | 5/15/2026 |