Skip to content
Docs Try Aspire

DistributedApplicationBuilder

Class net10.0
📦 Aspire.Hosting v13.1.2
A builder for creating instances of DistributedApplication.
namespace Aspire.Hosting;
public class DistributedApplicationBuilder
: Aspire.Hosting.IDistributedApplicationBuilder
{
// ...
}

The DistributedApplicationBuilder is the primary implementation of IDistributedApplicationBuilder within .NET Aspire. Typically a developer would interact with instances of this class via the IDistributedApplicationBuilder interface which was created using one of the DistributedApplication.CreateBuilder overloads.

For more information on how to configure the DistributedApplication using the the builder pattern see IDistributedApplicationBuilder.

View all constructors
View all properties
AddResource(T)
Adds a resource of type T to the distributed application.
Build
Builds and returns a new DistributedApplication instance. This can only be called once.
CreateResourceBuilder(T)
Creates a new resource builder based on an existing resource.
View all methods