The Particular.Aspire.Hosting.ServicePlatform package is an Aspire hosting integration that runs the Particular Platform (the ServiceControl instances, ServicePulse, persistence, and message transport) as part of an Aspire AppHost. It is intended for developers and technical leads who run the platform locally during development and want the same AppHost to carry through to publish-mode deployments, without maintaining a separate set of infrastructure scripts.
See the Aspire documentation for more details on how to use it.
Add the package to your Aspire AppHost project:
dotnet add package Particular.Aspire.Hosting.ServicePlatformAdd the Particular Service Platform to your AppHost with sensible defaults:
var builder = DistributedApplication.CreateBuilder(args);
var platform = builder
.AddParticularPlatform("particular")
.AddDefaultComponents();
builder.Build().Run();AddDefaultComponents() wires up the Learning transport, a RavenDB persistence container, ServiceControl error/audit/monitoring instances, and ServicePulse.
To attach an NServiceBus endpoint to the platform so it picks up the configured transport and license:
builder.AddProject<Projects.MyEndpoint>("my-endpoint")
.WithParticularPlatform(platform);For production use, swap the defaults for a real transport, persistence store, and license:
var asb = builder.AddAzureServiceBus("asb");
var ravenDb = builder.AddRavenDB("ravendb");
builder
.AddParticularPlatform("particular")
.WithTransportAzureServiceBus(asb)
.WithPersistenceRavenDb(ravenDb)
.WithLicenseFromFile("license.xml")
.AddDefaultComponents();The tests in src/Particular.Aspire.Hosting.ServicePlatform.UnitTests are approval tests that exercise the Aspire publish operation and verify the generated manifest. They do not start any runtime services, so no databases, message brokers, or containers need to be running on the host machine.
- .NET 10 SDK — the version pinned in
global.json.
No connection string configuration or Docker container is required to run the tests.
From the repository root:
dotnet build src/Particular.Aspire.Hosting.ServicePlatform.slnx
dotnet test src/Particular.Aspire.Hosting.ServicePlatform.slnxSee CONTRIBUTING.md.
Licensed under the RPL-1.5. See also SECURITY.md for the security policy.