Typed, testable resource groups in a large AppHost
A large Aspire AppHost accumulates procedural resource wiring and configuration that is hard to test and easy to misconfigure.
[HostKit]
partial class ShopHostKit;
[ResourceDefinition<Projects.Example_Service>("api")]
partial class ApiResourceKit
{
protected override IResourceBuilder<ProjectResource> BuildResource(
IDistributedApplicationBuilder builder)
=> builder.AddProject<Projects.Example_Service>(Name);
} What you get: Resource definitions become strongly typed, source-generated classes with generated host wiring and typed options.
One [HostKit] plus one [ResourceDefinition] per resource replaces procedural AppHost code, and the analyzer validates the wiring at compile time.
Read the guide →